source: asadb/settings.py @ 25aaeb6

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

Convert to South

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