source: remit/settings/__init__.py

Last change on this file was feed77c, checked in by Alex Dehnert <adehnert@…>, 11 years ago

RFP download/update process (and some tangential changes)

  • Property mode set to 100644
File size: 4.0 KB
RevLine 
[719e4bb]1# Django settings for treasury project.
[13a23ce]2import os
[92ca60e]3import sys
[13a23ce]4
[c386673]5SITE_ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
[2ff0d60]6SITE_WEB_PATH = ''
[13a23ce]7DEFAULT_DOMAIN = 'mit.edu'
[a4ac6bd]8
9DEBUG = False
10TEMPLATE_DEBUG = DEBUG
[719e4bb]11
[2e4e1fb]12ATOMIC_REQUESTS = True
13
[719e4bb]14ADMINS = (
[29e55de]15    ('Remit team', 'remit-default-addr@mit.edu'),
[719e4bb]16)
[29e55de]17SERVER_EMAIL = 'remit-default-addr@mit.edu'
[feed77c]18DEFAULT_FROM_EMAIL = 'remit-default-addr@mit.edu'
[719e4bb]19
[db191ee]20GROUP_NAME = 'Remit'
[856aac8]21GROUP_ABBR = 'RM'
[922e0e5]22SIGNATORY_EMAIL = None # used only for paper vouchers (which SAO killed)
[db191ee]23
[ff0ea05]24CC_SUBMITTER = False
25
[719e4bb]26MANAGERS = ADMINS
27
[7a292ed]28# When changing this, be aware of uses of the budgetarea_pathstr filter
[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
[d50ec5b]39SHORT_DATETIME_FORMAT = 'Y-m-d G:i'
40SHORT_DATETIME_FORMAT_F = '%Y-%M-%d %H:%M'
41
[719e4bb]42# Local time zone for this installation. Choices can be found here:
43# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
44# although not all choices may be available on all operating systems.
45# If running in a Windows environment this must be set to the same as your
46# system time zone.
[f5bebab]47TIME_ZONE = 'America/New_York'
[719e4bb]48
49# Language code for this installation. All choices can be found here:
50# http://www.i18nguy.com/unicode/language-identifiers.html
51LANGUAGE_CODE = 'en-us'
52
53SITE_ID = 1
54
55# If you set this to False, Django will make some optimizations so as not
56# to load the internationalization machinery.
57USE_I18N = True
58
[32b9b17]59# Required settings
60# SITE_URL_BASE: used to construct absolute URLs for use in emails
61
[c386673]62from local import *
[f5bebab]63
[719e4bb]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
[f5bebab]73STATIC_URL = SITE_WEB_PATH + '/static/'
74
[719e4bb]75# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
76# trailing slash.
77# Examples: "http://foo.com/media/", "/media/".
[2ff0d60]78ADMIN_MEDIA_PREFIX = SITE_WEB_PATH + '/media/admin/'
[719e4bb]79
[0f53aae]80LOGIN_REDIRECT_URL  = SITE_WEB_PATH + '/'
[cbf4568]81LOGIN_URL  = SITE_WEB_PATH + '/accounts/login'
82LOGOUT_URL = SITE_WEB_PATH + '/accounts/logout'
83
[719e4bb]84# List of callables that know how to import templates from various sources.
85TEMPLATE_LOADERS = (
[522674a]86    'django.template.loaders.filesystem.Loader',
87    'django.template.loaders.app_directories.Loader',
[719e4bb]88)
89
[1da6cca]90MIDDLEWARE_CLASSES = [
[719e4bb]91    'django.middleware.common.CommonMiddleware',
92    'django.contrib.sessions.middleware.SessionMiddleware',
93    'django.contrib.auth.middleware.AuthenticationMiddleware',
[fe7e946]94    'django.middleware.csrf.CsrfViewMiddleware',
95    'django.contrib.messages.middleware.MessageMiddleware',
[1da6cca]96]
[e68bc7a]97
[dbb39a2]98AUTHENTICATION_BACKENDS = [
[71d716d]99    'django.contrib.auth.backends.ModelBackend',
[dbb39a2]100]
101if AUTH_SOCK:
102    AUTHENTICATION_BACKENDS.insert(1, 'util.SocketAuth.SocketAuthBackend')
[1da6cca]103if ENABLE_SCRIPTS_AUTH:
104    MIDDLEWARE_CLASSES.append('mit.ScriptsRemoteUserMiddleware')
105    AUTHENTICATION_BACKENDS.insert(0, 'mit.ScriptsRemoteUserBackend')
[719e4bb]106
[92ca60e]107ROOT_URLCONF = 'remit.urls'
[719e4bb]108
109TEMPLATE_DIRS = (
110    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
111    # Always use forward slashes, even on Windows.
112    # Don't forget to use absolute paths, not relative paths.
[cafab4c]113    SITE_ROOT + '/templates/',
[32e360b]114    SITE_ROOT + '/remit_templates/',
[719e4bb]115)
116
117INSTALLED_APPS = (
[13a23ce]118    'django.contrib.admin',
119    'django.contrib.admindocs',
[719e4bb]120    'django.contrib.auth',
121    'django.contrib.contenttypes',
122    'django.contrib.sessions',
123    'django.contrib.sites',
[6479b5c]124    'django.contrib.staticfiles',
[13a23ce]125    'treebeard',
[3111c8a]126    'south',
[13a23ce]127    'vouchers',
[f468e6d]128    'finance_core',
[485673a]129    'util',
[719e4bb]130)
[2ff0d60]131
[3f34670]132EMAIL_SUBJECT_PREFIX = "[Remit: %s] " % (GROUP_ABBR,)
[e8550be]133USER_EMAIL_SIGNATURE = "%s Treasury" % (GROUP_NAME,)
[a9d44e0]134
[c386673]135from local_after import *
Note: See TracBrowser for help on using the repository browser.