source: asadb/settings.py @ a86a924

space-accessstablestage
Last change on this file since a86a924 was a86a924, checked in by Alex Dehnert <adehnert@…>, 14 years ago

Office access: start building basic models

  • Property mode set to 100644
File size: 3.6 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
8DEBUG = False
9TEMPLATE_DEBUG = DEBUG
10
11# Is this the main, production deployment?
12# If not, we won't try to propagate things to other systems.
13# (For example, no changing asa-official membership.)
14PRODUCTION_DEPLOYMENT = False
15
16ADMINS = (
17    ('ASA Database Team', 'asa-db@mit.edu',),
18)
19SERVER_EMAIL = 'asa-db-auto@mit.edu'
20
21MANAGERS = ADMINS
22
23DATABASES = {}
24
25KRB_KEYTAB = None
26KRB_PRINCIPAL = None
27
28ENABLE_SCRIPTS_AUTH = True
29
30COOKIES_PREFIX = "asadb_"
31SESSION_COOKIE_SECURE = True
32SESSION_COOKIE_HTTPONLY = True
33
34LOGFILE = "asa-db.log"
35
36# Local time zone for this installation. Choices can be found here:
37# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
38# although not all choices may be available on all operating systems.
39# If running in a Windows environment this must be set to the same as your
40# system time zone.
41TIME_ZONE = 'America/New_York'
42
43# Language code for this installation. All choices can be found here:
44# http://www.i18nguy.com/unicode/language-identifiers.html
45LANGUAGE_CODE = 'en-us'
46
47SITE_ID = 1
48
49# If you set this to False, Django will make some optimizations so as not
50# to load the internationalization machinery.
51USE_I18N = True
52
53DATETIME_FORMAT_PYTHON = "%c"
54
55from local_settings import *
56
57SESSION_COOKIE_NAME = COOKIES_PREFIX + "sessionid"
58CSRF_COOKIE_NAME = COOKIES_PREFIX + "csrftoken"
59
60# Absolute path to the directory that holds media.
61# Example: "/home/media/media.lawrence.com/"
62MEDIA_ROOT = SITE_ROOT + '/media/'
63
64# URL that handles the media served from MEDIA_ROOT. Make sure to use a
65# trailing slash if there is a path component (optional in other cases).
66# Examples: "http://media.lawrence.com", "http://example.com/media/"
67MEDIA_URL = SITE_WEB_PATH + '/media/'
68
69# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
70# trailing slash.
71# Examples: "http://foo.com/media/", "/media/".
72ADMIN_MEDIA_PREFIX = SITE_WEB_PATH + '/media/admin/'
73
74LOGIN_REDIRECT_URL  = SITE_WEB_PATH + '/'
75LOGIN_URL  = SITE_WEB_PATH + '/accounts/login'
76LOGOUT_URL = SITE_WEB_PATH + '/accounts/logout'
77
78# List of callables that know how to import templates from various sources.
79TEMPLATE_LOADERS = (
80    'django.template.loaders.filesystem.Loader',
81    'django.template.loaders.app_directories.load_template_source',
82#     'django.template.loaders.eggs.load_template_source',
83)
84
85MIDDLEWARE_CLASSES = [
86    'django.middleware.common.CommonMiddleware',
87    'django.contrib.sessions.middleware.SessionMiddleware',
88    'django.contrib.auth.middleware.AuthenticationMiddleware',
89    'django.middleware.transaction.TransactionMiddleware',
90    'django.middleware.csrf.CsrfViewMiddleware',
91    'reversion.middleware.RevisionMiddleware',
92]
93
94AUTHENTICATION_BACKENDS = [
95    'groups.models.PerGroupAuthz',
96    'django.contrib.auth.backends.ModelBackend',
97]
98
99if ENABLE_SCRIPTS_AUTH:
100    MIDDLEWARE_CLASSES.append('mit.ScriptsRemoteUserMiddleware')
101    AUTHENTICATION_BACKENDS.insert(0, 'mit.ScriptsRemoteUserBackend')
102
103
104ROOT_URLCONF = 'asadb.urls'
105
106TEMPLATE_DIRS = (
107    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
108    # Always use forward slashes, even on Windows.
109    # Don't forget to use absolute paths, not relative paths.
110    'template',
111)
112
113INSTALLED_APPS = (
114    'django.contrib.admin',
115    'django.contrib.admindocs',
116    'django.contrib.auth',
117    'django.contrib.contenttypes',
118    'django.contrib.sessions',
119    'django.contrib.sites',
120    'form_utils',
121    'django_filters',
122    'reversion',
123    'south',
124    'groups',
125    'forms',
126    'space',
127)
128
129from local_settings_after import *
Note: See TracBrowser for help on using the repository browser.