source: asadb/settings.py @ 1f94b84

fysm-4-1iframespace-accessstablestagetest-hooks
Last change on this file since 1f94b84 was 1e052c4, checked in by Alex Dehnert <adehnert@…>, 15 years ago

Use a useful login/logout URL

  • Property mode set to 100644
File size: 3.3 KB
Line 
1# Django settings for asadb project.
2import os
3import sys
4
5SITE_ROOT = os.path.normpath(os.path.dirname(__file__))
6SITE_WEB_PATH = ''
7
8
9DEBUG = True
10TEMPLATE_DEBUG = DEBUG
11
12ADMINS = (
13    ('ASA Database Team', 'asa-db@mit.edu',),
14)
15
16MANAGERS = ADMINS
17
18DATABASE_ENGINE = ''           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
19DATABASE_NAME = ''             # Or path to database file if using sqlite3.
20DATABASE_USER = ''             # Not used with sqlite3.
21DATABASE_PASSWORD = ''         # Not used with sqlite3.
22DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
23DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
24
25ENABLE_SCRIPTS_AUTH = True
26
27# Local time zone for this installation. Choices can be found here:
28# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
29# although not all choices may be available on all operating systems.
30# If running in a Windows environment this must be set to the same as your
31# system time zone.
32TIME_ZONE = 'America/Chicago'
33
34# Language code for this installation. All choices can be found here:
35# http://www.i18nguy.com/unicode/language-identifiers.html
36LANGUAGE_CODE = 'en-us'
37
38SITE_ID = 1
39
40# If you set this to False, Django will make some optimizations so as not
41# to load the internationalization machinery.
42USE_I18N = True
43
44from local_settings import *
45
46# Absolute path to the directory that holds media.
47# Example: "/home/media/media.lawrence.com/"
48MEDIA_ROOT = SITE_ROOT + '/media/'
49
50# URL that handles the media served from MEDIA_ROOT. Make sure to use a
51# trailing slash if there is a path component (optional in other cases).
52# Examples: "http://media.lawrence.com", "http://example.com/media/"
53MEDIA_URL = SITE_WEB_PATH + '/media/'
54
55# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
56# trailing slash.
57# Examples: "http://foo.com/media/", "/media/".
58ADMIN_MEDIA_PREFIX = SITE_WEB_PATH + '/media/admin/'
59
60LOGIN_REDIRECT_URL  = SITE_WEB_PATH + '/'
61LOGIN_URL  = SITE_WEB_PATH + '/accounts/login'
62LOGOUT_URL = SITE_WEB_PATH + '/accounts/logout'
63
64# List of callables that know how to import templates from various sources.
65TEMPLATE_LOADERS = (
66    'django.template.loaders.filesystem.load_template_source',
67    'django.template.loaders.app_directories.load_template_source',
68#     'django.template.loaders.eggs.load_template_source',
69)
70
71MIDDLEWARE_CLASSES = [
72    'django.middleware.common.CommonMiddleware',
73    'django.contrib.sessions.middleware.SessionMiddleware',
74    'django.contrib.auth.middleware.AuthenticationMiddleware',
75]
76
77AUTHENTICATION_BACKENDS = [
78    'django.contrib.auth.backends.ModelBackend',
79]
80
81if ENABLE_SCRIPTS_AUTH:
82    MIDDLEWARE_CLASSES.append('mit.ScriptsRemoteUserMiddleware')
83    AUTHENTICATION_BACKENDS.insert(0, 'mit.ScriptsRemoteUserBackend')
84
85
86ROOT_URLCONF = 'asadb.urls'
87
88TEMPLATE_DIRS = (
89    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
90    # Always use forward slashes, even on Windows.
91    # Don't forget to use absolute paths, not relative paths.
92    'template',
93)
94
95INSTALLED_APPS = (
96    'django.contrib.admin',
97    'django.contrib.admindocs',
98    'django.contrib.auth',
99    'django.contrib.contenttypes',
100    'django.contrib.sessions',
101    'django.contrib.sites',
102    'groups',
103    'forms',
104)
105
106from local_settings_after import *
Note: See TracBrowser for help on using the repository browser.