[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' |
---|
[719e4bb] | 16 | |
---|
[db191ee] | 17 | GROUP_NAME = 'Remit' |
---|
[856aac8] | 18 | GROUP_ABBR = 'RM' |
---|
[db191ee] | 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 | |
---|
[6f24604] | 30 | BASE_COMMITTEE_PATH = ['Accounts', 'Assets', ] |
---|
| 31 | |
---|
[dbb39a2] | 32 | AUTH_SOCK = None # Path to SocketAuth socket |
---|
| 33 | |
---|
[bdc699e] | 34 | from local_settings import * |
---|
| 35 | |
---|
[719e4bb] | 36 | # Local time zone for this installation. Choices can be found here: |
---|
| 37 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
---|
| 38 | # although not all choices may be available on all operating systems. |
---|
| 39 | # If running in a Windows environment this must be set to the same as your |
---|
| 40 | # system time zone. |
---|
| 41 | TIME_ZONE = 'America/Chicago' |
---|
| 42 | |
---|
| 43 | # Language code for this installation. All choices can be found here: |
---|
| 44 | # http://www.i18nguy.com/unicode/language-identifiers.html |
---|
| 45 | LANGUAGE_CODE = 'en-us' |
---|
| 46 | |
---|
| 47 | SITE_ID = 1 |
---|
| 48 | |
---|
| 49 | # If you set this to False, Django will make some optimizations so as not |
---|
| 50 | # to load the internationalization machinery. |
---|
| 51 | USE_I18N = True |
---|
| 52 | |
---|
| 53 | # Absolute path to the directory that holds media. |
---|
| 54 | # Example: "/home/media/media.lawrence.com/" |
---|
[cafab4c] | 55 | MEDIA_ROOT = SITE_ROOT + '/media/' |
---|
[719e4bb] | 56 | |
---|
| 57 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
---|
| 58 | # trailing slash if there is a path component (optional in other cases). |
---|
| 59 | # Examples: "http://media.lawrence.com", "http://example.com/media/" |
---|
[2ff0d60] | 60 | MEDIA_URL = SITE_WEB_PATH + '/media/' |
---|
[719e4bb] | 61 | |
---|
| 62 | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
---|
| 63 | # trailing slash. |
---|
| 64 | # Examples: "http://foo.com/media/", "/media/". |
---|
[2ff0d60] | 65 | ADMIN_MEDIA_PREFIX = SITE_WEB_PATH + '/media/admin/' |
---|
[719e4bb] | 66 | |
---|
[0f53aae] | 67 | LOGIN_REDIRECT_URL = SITE_WEB_PATH + '/' |
---|
[cbf4568] | 68 | LOGIN_URL = SITE_WEB_PATH + '/accounts/login' |
---|
| 69 | LOGOUT_URL = SITE_WEB_PATH + '/accounts/logout' |
---|
| 70 | |
---|
[719e4bb] | 71 | # List of callables that know how to import templates from various sources. |
---|
| 72 | TEMPLATE_LOADERS = ( |
---|
| 73 | 'django.template.loaders.filesystem.load_template_source', |
---|
| 74 | 'django.template.loaders.app_directories.load_template_source', |
---|
| 75 | # 'django.template.loaders.eggs.load_template_source', |
---|
| 76 | ) |
---|
| 77 | |
---|
| 78 | MIDDLEWARE_CLASSES = ( |
---|
| 79 | 'django.middleware.common.CommonMiddleware', |
---|
| 80 | 'django.contrib.sessions.middleware.SessionMiddleware', |
---|
| 81 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
---|
[3306b90] | 82 | #http://docs.djangoproject.com/en/dev/howto/auth-remote-user/ |
---|
[cb5f343] | 83 | #'django.contrib.auth.middleware.RemoteUserMiddleware', |
---|
[e68bc7a] | 84 | 'mit.ScriptsRemoteUserMiddleware', |
---|
| 85 | ) |
---|
| 86 | |
---|
[dbb39a2] | 87 | AUTHENTICATION_BACKENDS = [ |
---|
[71d716d] | 88 | 'mit.ScriptsRemoteUserBackend', |
---|
| 89 | 'django.contrib.auth.backends.ModelBackend', |
---|
[dbb39a2] | 90 | ] |
---|
| 91 | if AUTH_SOCK: |
---|
| 92 | AUTHENTICATION_BACKENDS.insert(1, 'util.SocketAuth.SocketAuthBackend') |
---|
[719e4bb] | 93 | |
---|
[92ca60e] | 94 | ROOT_URLCONF = 'remit.urls' |
---|
[719e4bb] | 95 | |
---|
| 96 | TEMPLATE_DIRS = ( |
---|
| 97 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
---|
| 98 | # Always use forward slashes, even on Windows. |
---|
| 99 | # Don't forget to use absolute paths, not relative paths. |
---|
[cafab4c] | 100 | SITE_ROOT + '/templates/', |
---|
[32e360b] | 101 | SITE_ROOT + '/remit_templates/', |
---|
[719e4bb] | 102 | ) |
---|
| 103 | |
---|
| 104 | INSTALLED_APPS = ( |
---|
[13a23ce] | 105 | 'django.contrib.admin', |
---|
| 106 | 'django.contrib.admindocs', |
---|
[719e4bb] | 107 | 'django.contrib.auth', |
---|
| 108 | 'django.contrib.contenttypes', |
---|
| 109 | 'django.contrib.sessions', |
---|
| 110 | 'django.contrib.sites', |
---|
[13a23ce] | 111 | 'treebeard', |
---|
[3111c8a] | 112 | 'south', |
---|
[13a23ce] | 113 | 'vouchers', |
---|
[f468e6d] | 114 | 'finance_core', |
---|
[485673a] | 115 | 'util', |
---|
[719e4bb] | 116 | ) |
---|
[2ff0d60] | 117 | |
---|
[3f34670] | 118 | EMAIL_SUBJECT_PREFIX = "[Remit: %s] " % (GROUP_ABBR,) |
---|
[e8550be] | 119 | USER_EMAIL_SIGNATURE = "%s Treasury" % (GROUP_NAME,) |
---|
[a9d44e0] | 120 | |
---|
[2ff0d60] | 121 | from local_settings_after import * |
---|