source: asadb/settings.py @ c49fbe2

fysm-4-1space-accessstablestagetest-hooks
Last change on this file since c49fbe2 was 4693952, checked in by Alex Dehnert <adehnert@…>, 16 years ago

Set SERVER_EMAIL

  • Property mode set to 100644
File size: 3.4 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 = False
10TEMPLATE_DEBUG = DEBUG
11
12ADMINS = (
13    ('ASA Database Team', 'asa-db@mit.edu',),
14)
15SERVER_EMAIL = 'asa-db-auto@mit.edu'
16
17MANAGERS = ADMINS
18
19DATABASE_ENGINE = ''           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
20DATABASE_NAME = ''             # Or path to database file if using sqlite3.
21DATABASE_USER = ''             # Not used with sqlite3.
22DATABASE_PASSWORD = ''         # Not used with sqlite3.
23DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
24DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
25
26ENABLE_SCRIPTS_AUTH = True
27
28LOGFILE = "asa-db.log"
29
30# Local time zone for this installation. Choices can be found here:
31# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
32# although not all choices may be available on all operating systems.
33# If running in a Windows environment this must be set to the same as your
34# system time zone.
35TIME_ZONE = 'America/Chicago'
36
37# Language code for this installation. All choices can be found here:
38# http://www.i18nguy.com/unicode/language-identifiers.html
39LANGUAGE_CODE = 'en-us'
40
41SITE_ID = 1
42
43# If you set this to False, Django will make some optimizations so as not
44# to load the internationalization machinery.
45USE_I18N = True
46
47from local_settings import *
48
49# Absolute path to the directory that holds media.
50# Example: "/home/media/media.lawrence.com/"
51MEDIA_ROOT = SITE_ROOT + '/media/'
52
53# URL that handles the media served from MEDIA_ROOT. Make sure to use a
54# trailing slash if there is a path component (optional in other cases).
55# Examples: "http://media.lawrence.com", "http://example.com/media/"
56MEDIA_URL = SITE_WEB_PATH + '/media/'
57
58# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
59# trailing slash.
60# Examples: "http://foo.com/media/", "/media/".
61ADMIN_MEDIA_PREFIX = SITE_WEB_PATH + '/media/admin/'
62
63LOGIN_REDIRECT_URL  = SITE_WEB_PATH + '/'
64LOGIN_URL  = SITE_WEB_PATH + '/accounts/login'
65LOGOUT_URL = SITE_WEB_PATH + '/accounts/logout'
66
67# List of callables that know how to import templates from various sources.
68TEMPLATE_LOADERS = (
69    'django.template.loaders.filesystem.load_template_source',
70    'django.template.loaders.app_directories.load_template_source',
71#     'django.template.loaders.eggs.load_template_source',
72)
73
74MIDDLEWARE_CLASSES = [
75    'django.middleware.common.CommonMiddleware',
76    'django.contrib.sessions.middleware.SessionMiddleware',
77    'django.contrib.auth.middleware.AuthenticationMiddleware',
78]
79
80AUTHENTICATION_BACKENDS = [
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    'south',
106    'groups',
107    'forms',
108)
109
110from local_settings_after import *
Note: See TracBrowser for help on using the repository browser.