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