source: remit/settings.py @ 5eb287f

client
Last change on this file since 5eb287f was 857256d, checked in by Alex Dehnert <adehnert@…>, 15 years ago

Make depth of the committee hierarchy configurable

The UA and ESP have a two-level hierarchy:

UA:

  • General
    • Senate, Exec, Operating
  • Committees
    • All the committees

ESP:

  • Programs
    • All the programs
  • Officers
    • All the officers

However, many groups are likely to have a natural single-level hierarchy,
and Remit should not force them to contort their accounting to fit
Remit's needs.

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