source: remit/settings.py @ dcaa9c0

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

AUTHENTICATION_BACKENDS is plural for a reason.

Punt the USE_CERTS option. We can resolve the
"when using cert auth you can't use password
login" issue by enabling multiple auth backends.

  • Property mode set to 100644
File size: 3.6 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
[db191ee]17GROUP_NAME = 'Remit'
18SIGNATORY_EMAIL = None
19
[719e4bb]20MANAGERS = ADMINS
21
[13a23ce]22DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
[07daa76]23DATABASE_NAME = os.path.join(SITE_ROOT, 'treasury.sqlite')             # Or path to database file if using sqlite3.
[719e4bb]24DATABASE_USER = ''             # Not used with sqlite3.
25DATABASE_PASSWORD = ''         # Not used with sqlite3.
26DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
27DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
28
[bdc699e]29from local_settings import *
30
[719e4bb]31# Local time zone for this installation. Choices can be found here:
32# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
33# although not all choices may be available on all operating systems.
34# If running in a Windows environment this must be set to the same as your
35# system time zone.
36TIME_ZONE = 'America/Chicago'
37
38# Language code for this installation. All choices can be found here:
39# http://www.i18nguy.com/unicode/language-identifiers.html
40LANGUAGE_CODE = 'en-us'
41
42SITE_ID = 1
43
44# If you set this to False, Django will make some optimizations so as not
45# to load the internationalization machinery.
46USE_I18N = True
47
48# Absolute path to the directory that holds media.
49# Example: "/home/media/media.lawrence.com/"
[cafab4c]50MEDIA_ROOT = SITE_ROOT + '/media/'
[719e4bb]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/"
[2ff0d60]55MEDIA_URL = SITE_WEB_PATH + '/media/'
[719e4bb]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/".
[2ff0d60]60ADMIN_MEDIA_PREFIX = SITE_WEB_PATH + '/media/admin/'
[719e4bb]61
[cbf4568]62LOGIN_REDIRECT_URL  = SITE_WEB_PATH + '/accounts/profile'
63LOGIN_URL  = SITE_WEB_PATH + '/accounts/login'
64LOGOUT_URL = SITE_WEB_PATH + '/accounts/logout'
65
[719e4bb]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',
[3306b90]77    #http://docs.djangoproject.com/en/dev/howto/auth-remote-user/
[cb5f343]78    #'django.contrib.auth.middleware.RemoteUserMiddleware',
[e68bc7a]79    'mit.ScriptsRemoteUserMiddleware',
80)
81
[71d716d]82AUTHENTICATION_BACKENDS = (
83    'mit.ScriptsRemoteUserBackend',
84    'django.contrib.auth.backends.ModelBackend',
85)
[719e4bb]86
[92ca60e]87ROOT_URLCONF = 'remit.urls'
[719e4bb]88
89TEMPLATE_DIRS = (
90    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
91    # Always use forward slashes, even on Windows.
92    # Don't forget to use absolute paths, not relative paths.
[cafab4c]93    SITE_ROOT + '/templates/',
[32e360b]94    SITE_ROOT + '/remit_templates/',
[719e4bb]95)
96
97INSTALLED_APPS = (
[13a23ce]98    'django.contrib.admin',
99    'django.contrib.admindocs',
[719e4bb]100    'django.contrib.auth',
101    'django.contrib.contenttypes',
102    'django.contrib.sessions',
103    'django.contrib.sites',
[13a23ce]104    'treebeard',
105    'vouchers',
[f468e6d]106    'finance_core',
[485673a]107    'util',
[719e4bb]108)
[2ff0d60]109
110from local_settings_after import *
Note: See TracBrowser for help on using the repository browser.