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