source: remit/settings.py @ 02030a2

client
Last change on this file since 02030a2 was 6f24604, checked in by Alex Dehnert <adehnert@…>, 15 years ago

Make reimbursement base path configurable

Adds a BASE_COMMITTEE_PATH parameter (default ['Accounts', 'Assets', ])
to use as the base path for reimbursement requests.

UPGRADE NOTE: Previously the value was hardcoded as
['Accounts', 'Assets', 'Budget', ] --- previous deployments should make
sure to set BASE_COMMITTEE_PATH to that when upgrading.

  • Property mode set to 100644
File size: 3.7 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
17GROUP_NAME = 'Remit'
18GROUP_ABBR = 'RM'
19SIGNATORY_EMAIL = None
20
21MANAGERS = ADMINS
22
23DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
24DATABASE_NAME = os.path.join(SITE_ROOT, 'treasury.sqlite')             # Or path to database file if using sqlite3.
25DATABASE_USER = ''             # Not used with sqlite3.
26DATABASE_PASSWORD = ''         # Not used with sqlite3.
27DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
28DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
29
30BASE_COMMITTEE_PATH = ['Accounts', 'Assets', ]
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    'mit.ScriptsRemoteUserMiddleware',
83)
84
85AUTHENTICATION_BACKENDS = (
86    'mit.ScriptsRemoteUserBackend',
87    'django.contrib.auth.backends.ModelBackend',
88)
89
90ROOT_URLCONF = 'remit.urls'
91
92TEMPLATE_DIRS = (
93    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
94    # Always use forward slashes, even on Windows.
95    # Don't forget to use absolute paths, not relative paths.
96    SITE_ROOT + '/templates/',
97    SITE_ROOT + '/remit_templates/',
98)
99
100INSTALLED_APPS = (
101    'django.contrib.admin',
102    'django.contrib.admindocs',
103    'django.contrib.auth',
104    'django.contrib.contenttypes',
105    'django.contrib.sessions',
106    'django.contrib.sites',
107    'treebeard',
108    'south',
109    'vouchers',
110    'finance_core',
111    'util',
112)
113
114EMAIL_SUBJECT_PREFIX = "[Remit: %s] " % (GROUP_ABBR,)
115USER_EMAIL_SIGNATURE = "%s Treasury" % (GROUP_NAME,)
116
117from local_settings_after import *
Note: See TracBrowser for help on using the repository browser.