source: remit/settings.py @ 2fb5a35

client
Last change on this file since 2fb5a35 was ff0ea05, checked in by Alex Dehnert <adehnert@…>, 15 years ago

Add CC_SUBMITTER option (Trac: #25)

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