source: asadb/settings.py @ 47998d1

space-accessstablestagetest-hooks
Last change on this file since 47998d1 was 4da2aeb, checked in by Alex Dehnert <adehnert@…>, 14 years ago

Fix a deprecation warning

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