source: remit/settings.py @ d50ec5b

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

Allow marking things as RFPized

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