source: remit/settings.py @ e1086bd

client
Last change on this file since e1086bd was 29e55de, checked in by Alex Dehnert <adehnert@…>, 15 years ago

Use remit-default-addr@… as a default

Using remit@… as a default address is stupid because it causes
more people to get stupid spam that they don't want. Instead, use
remit-default-addr@… (this is similar to the switch to
remit-demo@… for the same settings on the demo install).

  • 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'
[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
[bdc699e]42from 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.
49TIME_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
53LANGUAGE_CODE = 'en-us'
54
55SITE_ID = 1
56
57# If you set this to False, Django will make some optimizations so as not
58# to load the internationalization machinery.
59USE_I18N = True
60
61# Absolute path to the directory that holds media.
62# Example: "/home/media/media.lawrence.com/"
[cafab4c]63MEDIA_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]68MEDIA_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]73ADMIN_MEDIA_PREFIX = SITE_WEB_PATH + '/media/admin/'
[719e4bb]74
[0f53aae]75LOGIN_REDIRECT_URL  = SITE_WEB_PATH + '/'
[cbf4568]76LOGIN_URL  = SITE_WEB_PATH + '/accounts/login'
77LOGOUT_URL = SITE_WEB_PATH + '/accounts/logout'
78
[719e4bb]79# List of callables that know how to import templates from various sources.
80TEMPLATE_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]86MIDDLEWARE_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]94AUTHENTICATION_BACKENDS = [
[71d716d]95    'django.contrib.auth.backends.ModelBackend',
[dbb39a2]96]
97if AUTH_SOCK:
98    AUTHENTICATION_BACKENDS.insert(1, 'util.SocketAuth.SocketAuthBackend')
[1da6cca]99if ENABLE_SCRIPTS_AUTH:
100    MIDDLEWARE_CLASSES.append('mit.ScriptsRemoteUserMiddleware')
101    AUTHENTICATION_BACKENDS.insert(0, 'mit.ScriptsRemoteUserBackend')
[719e4bb]102
[92ca60e]103ROOT_URLCONF = 'remit.urls'
[719e4bb]104
105TEMPLATE_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
113INSTALLED_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]127EMAIL_SUBJECT_PREFIX = "[Remit: %s] " % (GROUP_ABBR,)
[e8550be]128USER_EMAIL_SIGNATURE = "%s Treasury" % (GROUP_NAME,)
[a9d44e0]129
[2ff0d60]130from local_settings_after import *
Note: See TracBrowser for help on using the repository browser.