source: remit/settings.py @ fedcbcf

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

Cert auth works!

  • Property mode set to 100644
File size: 3.5 KB
RevLine 
[719e4bb]1# Django settings for treasury project.
[13a23ce]2import os
[92ca60e]3import sys
[13a23ce]4
[cafab4c]5SITE_ROOT = os.path.normpath(os.path.dirname(__file__))
[2ff0d60]6SITE_WEB_PATH = ''
[13a23ce]7DEFAULT_DOMAIN = 'mit.edu'
[719e4bb]8
9DEBUG = True
10TEMPLATE_DEBUG = DEBUG
11
12ADMINS = (
[bdc699e]13    ('Remit team', 'remit@mit.edu'),
[719e4bb]14)
[a4af17d]15SERVER_EMAIL = 'remit@mit.edu'
[719e4bb]16
17MANAGERS = ADMINS
18
[13a23ce]19DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
[07daa76]20DATABASE_NAME = os.path.join(SITE_ROOT, 'treasury.sqlite')             # Or path to database file if using sqlite3.
[719e4bb]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
[bdc699e]26from local_settings import *
27
[719e4bb]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/"
[cafab4c]47MEDIA_ROOT = SITE_ROOT + '/media/'
[719e4bb]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/"
[2ff0d60]52MEDIA_URL = SITE_WEB_PATH + '/media/'
[719e4bb]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/".
[2ff0d60]57ADMIN_MEDIA_PREFIX = SITE_WEB_PATH + '/media/admin/'
[719e4bb]58
[cbf4568]59LOGIN_REDIRECT_URL  = SITE_WEB_PATH + '/accounts/profile'
60LOGIN_URL  = SITE_WEB_PATH + '/accounts/login'
61LOGOUT_URL = SITE_WEB_PATH + '/accounts/logout'
62
[719e4bb]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',
[3306b90]74    #http://docs.djangoproject.com/en/dev/howto/auth-remote-user/
75    'django.contrib.auth.middleware.RemoteUserMiddleware',
[e68bc7a]76    'mit.ScriptsRemoteUserMiddleware',
77)
78
79AUTHENTICATION_BACKENDS = (
[c5898ff]80    'mit.ScriptsRemoteUserBackend',
[719e4bb]81)
82
[92ca60e]83ROOT_URLCONF = 'remit.urls'
[719e4bb]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.
[cafab4c]89    SITE_ROOT + '/templates/',
[32e360b]90    SITE_ROOT + '/remit_templates/',
[719e4bb]91)
92
93INSTALLED_APPS = (
[13a23ce]94    'django.contrib.admin',
95    'django.contrib.admindocs',
[719e4bb]96    'django.contrib.auth',
97    'django.contrib.contenttypes',
98    'django.contrib.sessions',
99    'django.contrib.sites',
[13a23ce]100    'treebeard',
101    'vouchers',
[f468e6d]102    'finance_core',
[719e4bb]103)
[2ff0d60]104
105from local_settings_after import *
Note: See TracBrowser for help on using the repository browser.