source: remit/settings.py @ a6806bf

client
Last change on this file since a6806bf was c5898ff, checked in by Alex Dehnert <adehnert@…>, 15 years ago

Cert auth works!

  • Property mode set to 100644
File size: 3.5 KB
Line 
1# Django settings for treasury project.
2import os
3import sys
4
5SITE_ROOT = os.path.normpath(os.path.dirname(__file__))
6SITE_WEB_PATH = ''
7DEFAULT_DOMAIN = 'mit.edu'
8
9DEBUG = True
10TEMPLATE_DEBUG = DEBUG
11
12ADMINS = (
13    ('Remit team', 'remit@mit.edu'),
14)
15SERVER_EMAIL = 'remit@mit.edu'
16
17MANAGERS = ADMINS
18
19DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
20DATABASE_NAME = os.path.join(SITE_ROOT, 'treasury.sqlite')             # 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
26from local_settings import *
27
28# Local time zone for this installation. Choices can be found here:
29# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
30# although not all choices may be available on all operating systems.
31# If running in a Windows environment this must be set to the same as your
32# system time zone.
33TIME_ZONE = 'America/Chicago'
34
35# Language code for this installation. All choices can be found here:
36# http://www.i18nguy.com/unicode/language-identifiers.html
37LANGUAGE_CODE = 'en-us'
38
39SITE_ID = 1
40
41# If you set this to False, Django will make some optimizations so as not
42# to load the internationalization machinery.
43USE_I18N = True
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 + '/accounts/profile'
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.load_template_source',
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    #http://docs.djangoproject.com/en/dev/howto/auth-remote-user/
75    'django.contrib.auth.middleware.RemoteUserMiddleware',
76    'mit.ScriptsRemoteUserMiddleware',
77)
78
79AUTHENTICATION_BACKENDS = (
80    'mit.ScriptsRemoteUserBackend',
81)
82
83ROOT_URLCONF = 'remit.urls'
84
85TEMPLATE_DIRS = (
86    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
87    # Always use forward slashes, even on Windows.
88    # Don't forget to use absolute paths, not relative paths.
89    SITE_ROOT + '/templates/',
90    SITE_ROOT + '/remit_templates/',
91)
92
93INSTALLED_APPS = (
94    'django.contrib.admin',
95    'django.contrib.admindocs',
96    'django.contrib.auth',
97    'django.contrib.contenttypes',
98    'django.contrib.sessions',
99    'django.contrib.sites',
100    'treebeard',
101    'vouchers',
102    'finance_core',
103)
104
105from local_settings_after import *
Note: See TracBrowser for help on using the repository browser.