source: remit/settings.py @ 2fb5a35

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

Add CC_SUBMITTER option (Trac: #25)

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