source: remit/settings.py @ 0e4f185

client
Last change on this file since 0e4f185 was d50ec5b, checked in by Alex Dehnert <adehnert@…>, 14 years ago

Allow marking things as RFPized

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