1 | # Django settings for treasury project. |
---|
2 | import os |
---|
3 | import sys |
---|
4 | |
---|
5 | SITE_ROOT = os.path.normpath(os.path.dirname(__file__)) |
---|
6 | SITE_WEB_PATH = '' |
---|
7 | DEFAULT_DOMAIN = 'mit.edu' |
---|
8 | |
---|
9 | DEBUG = True |
---|
10 | TEMPLATE_DEBUG = DEBUG |
---|
11 | |
---|
12 | ADMINS = ( |
---|
13 | ('Remit team', 'remit@mit.edu'), |
---|
14 | ) |
---|
15 | SERVER_EMAIL = 'remit@mit.edu' |
---|
16 | |
---|
17 | GROUP_NAME = 'Remit' |
---|
18 | SIGNATORY_EMAIL = None |
---|
19 | |
---|
20 | MANAGERS = ADMINS |
---|
21 | |
---|
22 | DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
---|
23 | DATABASE_NAME = os.path.join(SITE_ROOT, 'treasury.sqlite') # Or path to database file if using sqlite3. |
---|
24 | DATABASE_USER = '' # Not used with sqlite3. |
---|
25 | DATABASE_PASSWORD = '' # Not used with sqlite3. |
---|
26 | DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. |
---|
27 | DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. |
---|
28 | |
---|
29 | from local_settings import * |
---|
30 | |
---|
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. |
---|
36 | TIME_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 |
---|
40 | LANGUAGE_CODE = 'en-us' |
---|
41 | |
---|
42 | SITE_ID = 1 |
---|
43 | |
---|
44 | # If you set this to False, Django will make some optimizations so as not |
---|
45 | # to load the internationalization machinery. |
---|
46 | USE_I18N = True |
---|
47 | |
---|
48 | # Absolute path to the directory that holds media. |
---|
49 | # Example: "/home/media/media.lawrence.com/" |
---|
50 | MEDIA_ROOT = SITE_ROOT + '/media/' |
---|
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/" |
---|
55 | MEDIA_URL = SITE_WEB_PATH + '/media/' |
---|
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/". |
---|
60 | ADMIN_MEDIA_PREFIX = SITE_WEB_PATH + '/media/admin/' |
---|
61 | |
---|
62 | LOGIN_REDIRECT_URL = SITE_WEB_PATH + '/accounts/profile' |
---|
63 | LOGIN_URL = SITE_WEB_PATH + '/accounts/login' |
---|
64 | LOGOUT_URL = SITE_WEB_PATH + '/accounts/logout' |
---|
65 | |
---|
66 | # List of callables that know how to import templates from various sources. |
---|
67 | TEMPLATE_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 | |
---|
73 | MIDDLEWARE_CLASSES = ( |
---|
74 | 'django.middleware.common.CommonMiddleware', |
---|
75 | 'django.contrib.sessions.middleware.SessionMiddleware', |
---|
76 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
---|
77 | #http://docs.djangoproject.com/en/dev/howto/auth-remote-user/ |
---|
78 | 'django.contrib.auth.middleware.RemoteUserMiddleware', |
---|
79 | 'mit.ScriptsRemoteUserMiddleware', |
---|
80 | ) |
---|
81 | |
---|
82 | AUTHENTICATION_BACKENDS = ( |
---|
83 | 'mit.ScriptsRemoteUserBackend', |
---|
84 | ) |
---|
85 | |
---|
86 | ROOT_URLCONF = 'remit.urls' |
---|
87 | |
---|
88 | TEMPLATE_DIRS = ( |
---|
89 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
---|
90 | # Always use forward slashes, even on Windows. |
---|
91 | # Don't forget to use absolute paths, not relative paths. |
---|
92 | SITE_ROOT + '/templates/', |
---|
93 | SITE_ROOT + '/remit_templates/', |
---|
94 | ) |
---|
95 | |
---|
96 | INSTALLED_APPS = ( |
---|
97 | 'django.contrib.admin', |
---|
98 | 'django.contrib.admindocs', |
---|
99 | 'django.contrib.auth', |
---|
100 | 'django.contrib.contenttypes', |
---|
101 | 'django.contrib.sessions', |
---|
102 | 'django.contrib.sites', |
---|
103 | 'treebeard', |
---|
104 | 'vouchers', |
---|
105 | 'finance_core', |
---|
106 | 'util', |
---|
107 | ) |
---|
108 | |
---|
109 | from local_settings_after import * |
---|