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