source: remit/settings.py @ 6eb1795

client
Last change on this file since 6eb1795 was 6eb1795, checked in by Alex Dehnert <adehnert@…>, 14 years ago

DEBUG shouldn't be set in the default settings.py

  • Property mode set to 100644
File size: 3.9 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
9ADMINS = (
10    ('Remit team', 'remit@mit.edu'),
11)
12SERVER_EMAIL = 'remit@mit.edu'
13
14GROUP_NAME = 'Remit'
15GROUP_ABBR = 'RM'
16SIGNATORY_EMAIL = None
17
18MANAGERS = ADMINS
19
20DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
21DATABASE_NAME = os.path.join(SITE_ROOT, 'treasury.sqlite')             # Or path to database file if using sqlite3.
22DATABASE_USER = ''             # Not used with sqlite3.
23DATABASE_PASSWORD = ''         # Not used with sqlite3.
24DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
25DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
26
27BASE_COMMITTEE_PATH = ['Accounts', 'Assets', ]
28
29AUTH_SOCK = None # Path to SocketAuth socket
30ENABLE_SCRIPTS_AUTH = True
31
32from local_settings import *
33
34# Local time zone for this installation. Choices can be found here:
35# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
36# although not all choices may be available on all operating systems.
37# If running in a Windows environment this must be set to the same as your
38# system time zone.
39TIME_ZONE = 'America/Chicago'
40
41# Language code for this installation. All choices can be found here:
42# http://www.i18nguy.com/unicode/language-identifiers.html
43LANGUAGE_CODE = 'en-us'
44
45SITE_ID = 1
46
47# If you set this to False, Django will make some optimizations so as not
48# to load the internationalization machinery.
49USE_I18N = True
50
51# Absolute path to the directory that holds media.
52# Example: "/home/media/media.lawrence.com/"
53MEDIA_ROOT = SITE_ROOT + '/media/'
54
55# URL that handles the media served from MEDIA_ROOT. Make sure to use a
56# trailing slash if there is a path component (optional in other cases).
57# Examples: "http://media.lawrence.com", "http://example.com/media/"
58MEDIA_URL = SITE_WEB_PATH + '/media/'
59
60# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
61# trailing slash.
62# Examples: "http://foo.com/media/", "/media/".
63ADMIN_MEDIA_PREFIX = SITE_WEB_PATH + '/media/admin/'
64
65LOGIN_REDIRECT_URL  = SITE_WEB_PATH + '/'
66LOGIN_URL  = SITE_WEB_PATH + '/accounts/login'
67LOGOUT_URL = SITE_WEB_PATH + '/accounts/logout'
68
69# List of callables that know how to import templates from various sources.
70TEMPLATE_LOADERS = (
71    'django.template.loaders.filesystem.load_template_source',
72    'django.template.loaders.app_directories.load_template_source',
73#     'django.template.loaders.eggs.load_template_source',
74)
75
76MIDDLEWARE_CLASSES = [
77    'django.middleware.common.CommonMiddleware',
78    'django.contrib.sessions.middleware.SessionMiddleware',
79    'django.contrib.auth.middleware.AuthenticationMiddleware',
80    #http://docs.djangoproject.com/en/dev/howto/auth-remote-user/
81    #'django.contrib.auth.middleware.RemoteUserMiddleware',
82]
83
84AUTHENTICATION_BACKENDS = [
85    'django.contrib.auth.backends.ModelBackend',
86]
87if AUTH_SOCK:
88    AUTHENTICATION_BACKENDS.insert(1, 'util.SocketAuth.SocketAuthBackend')
89if ENABLE_SCRIPTS_AUTH:
90    MIDDLEWARE_CLASSES.append('mit.ScriptsRemoteUserMiddleware')
91    AUTHENTICATION_BACKENDS.insert(0, 'mit.ScriptsRemoteUserBackend')
92
93ROOT_URLCONF = 'remit.urls'
94
95TEMPLATE_DIRS = (
96    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
97    # Always use forward slashes, even on Windows.
98    # Don't forget to use absolute paths, not relative paths.
99    SITE_ROOT + '/templates/',
100    SITE_ROOT + '/remit_templates/',
101)
102
103INSTALLED_APPS = (
104    'django.contrib.admin',
105    'django.contrib.admindocs',
106    'django.contrib.auth',
107    'django.contrib.contenttypes',
108    'django.contrib.sessions',
109    'django.contrib.sites',
110    'treebeard',
111    'south',
112    'vouchers',
113    'finance_core',
114    'util',
115)
116
117EMAIL_SUBJECT_PREFIX = "[Remit: %s] " % (GROUP_ABBR,)
118USER_EMAIL_SIGNATURE = "%s Treasury" % (GROUP_NAME,)
119
120from local_settings_after import *
Note: See TracBrowser for help on using the repository browser.