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
Line 
1# Django settings for treasury project.
2import os
3import sys
4
5SITE_ROOT = os.path.normpath(os.path.dirname(__file__))
6SITE_WEB_PATH = ''
7DEFAULT_DOMAIN = 'mit.edu'
8
9DEBUG = False
10TEMPLATE_DEBUG = DEBUG
11
12ADMINS = (
13    ('Remit team', 'remit-default-addr@mit.edu'),
14)
15SERVER_EMAIL = 'remit-default-addr@mit.edu'
16
17GROUP_NAME = 'Remit'
18GROUP_ABBR = 'RM'
19SIGNATORY_EMAIL = None
20
21CC_SUBMITTER = False
22
23MANAGERS = ADMINS
24
25DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
26DATABASE_NAME = os.path.join(SITE_ROOT, 'treasury.sqlite')             # Or path to database file if using sqlite3.
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
32BASE_COMMITTEE_PATH = ['Accounts', 'Assets', ]
33COMMITTEE_HIERARCHY_LEVELS = 2
34
35AUTH_SOCK = None # Path to SocketAuth socket
36ENABLE_SCRIPTS_AUTH = True
37
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
42from local_settings import *
43
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/"
63MEDIA_ROOT = SITE_ROOT + '/media/'
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/"
68MEDIA_URL = SITE_WEB_PATH + '/media/'
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/".
73ADMIN_MEDIA_PREFIX = SITE_WEB_PATH + '/media/admin/'
74
75LOGIN_REDIRECT_URL  = SITE_WEB_PATH + '/'
76LOGIN_URL  = SITE_WEB_PATH + '/accounts/login'
77LOGOUT_URL = SITE_WEB_PATH + '/accounts/logout'
78
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
86MIDDLEWARE_CLASSES = [
87    'django.middleware.common.CommonMiddleware',
88    'django.contrib.sessions.middleware.SessionMiddleware',
89    'django.contrib.auth.middleware.AuthenticationMiddleware',
90    #http://docs.djangoproject.com/en/dev/howto/auth-remote-user/
91    #'django.contrib.auth.middleware.RemoteUserMiddleware',
92]
93
94AUTHENTICATION_BACKENDS = [
95    'django.contrib.auth.backends.ModelBackend',
96]
97if AUTH_SOCK:
98    AUTHENTICATION_BACKENDS.insert(1, 'util.SocketAuth.SocketAuthBackend')
99if ENABLE_SCRIPTS_AUTH:
100    MIDDLEWARE_CLASSES.append('mit.ScriptsRemoteUserMiddleware')
101    AUTHENTICATION_BACKENDS.insert(0, 'mit.ScriptsRemoteUserBackend')
102
103ROOT_URLCONF = 'remit.urls'
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.
109    SITE_ROOT + '/templates/',
110    SITE_ROOT + '/remit_templates/',
111)
112
113INSTALLED_APPS = (
114    'django.contrib.admin',
115    'django.contrib.admindocs',
116    'django.contrib.auth',
117    'django.contrib.contenttypes',
118    'django.contrib.sessions',
119    'django.contrib.sites',
120    'treebeard',
121    'south',
122    'vouchers',
123    'finance_core',
124    'util',
125)
126
127EMAIL_SUBJECT_PREFIX = "[Remit: %s] " % (GROUP_ABBR,)
128USER_EMAIL_SIGNATURE = "%s Treasury" % (GROUP_NAME,)
129
130from local_settings_after import *
Note: See TracBrowser for help on using the repository browser.