* Put my email in the ADMINS settings, so I get mailed when a server error occurs.
[matthijs/projects/xerxes.git] / settings.py
1 # Django settings for xerxes project.
2
3 import os
4
5 # Import database settings from a default file (so we can keep those out
6 # of git).
7 from dbsettings import *
8
9 PROJECT_DIR = os.path.dirname(__file__)
10
11 DEBUG = False
12 TEMPLATE_DEBUG = DEBUG
13
14 ADMINS = (
15     # Server errors get sent here
16     ('Matthijs Kooijman', 'matthijs@stdin.nl'),
17 )
18
19 MANAGERS = ADMINS
20
21
22 # Local time zone for this installation. Choices can be found here:
23 # http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
24 # although not all variations may be possible on all operating systems.
25 # If running in a Windows environment this must be set to the same as your
26 # system time zone.
27 TIME_ZONE = 'Europe/Amsterdam'
28
29 # Language code for this installation. All choices can be found here:
30 # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
31 # http://blogs.law.harvard.edu/tech/stories/storyReader$15
32 #LANGUAGE_CODE = 'en-us'
33 LANGUAGE_CODE = 'nl'
34 LANGUAGES = (
35     ('nl', 'Nederlands'),
36     ('en', 'English'),
37 )
38
39 SITE_ID = 1
40
41 # If you set this to False, Django will make some optimizations so as not
42 # to load the internationalization machinery.
43 USE_I18N = True
44
45 # Absolute path to the directory that holds media.
46 # Example: "/home/media/media.lawrence.com/"
47 MEDIA_ROOT = ''
48
49 # URL that handles the media served from MEDIA_ROOT.
50 # Example: "http://media.lawrence.com"
51 MEDIA_URL = ''
52
53 # URL prefix for static files. Will be made available by
54 # xerxes.tools.context_processors.static
55 STATIC_URL_PREFIX = '/static/'
56
57 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
58 # trailing slash.
59 # Examples: "http://foo.com/media/", "/media/".
60 ADMIN_MEDIA_PREFIX = '/media/'
61
62 # Make this unique, and don't share it with anybody.
63 SECRET_KEY = '6-zo+-1@-342%k4%82aw#kxr4f%5w00xhwby5$&fa@+!dh@(2='
64
65 # List of callables that know how to import templates from various sources.
66 TEMPLATE_LOADERS = (
67     'django.template.loaders.filesystem.load_template_source',
68     'django.template.loaders.app_directories.load_template_source',
69 #     'django.template.loaders.eggs.load_template_source',
70 )
71
72 MIDDLEWARE_CLASSES = (
73     'django.middleware.common.CommonMiddleware',
74     'django.contrib.sessions.middleware.SessionMiddleware',
75     'django.contrib.auth.middleware.AuthenticationMiddleware',
76     'django.middleware.doc.XViewMiddleware',
77     # Let's keep this disabled (until we can offer language selection to
78     # users).
79     #'django.middleware.locale.LocaleMiddleware',
80 )
81
82 ROOT_URLCONF = 'xerxes.urls'
83
84 TEMPLATE_DIRS = (
85     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
86     # Always use forward slashes, even on Windows.
87     # Don't forget to use absolute paths, not relative paths.
88     os.path.join(PROJECT_DIR, 'templates'),
89 )
90
91 INSTALLED_APPS = (
92     'django.contrib.auth',
93     'django.contrib.contenttypes',
94     'django.contrib.sessions',
95     'django.contrib.sites',
96     'django.contrib.admin',
97     'xerxes.events',
98     'xerxes.influences',
99     'xerxes.base',
100     'xerxes.tools',
101 )
102
103 TEMPLATE_CONTEXT_PROCESSORS = (
104     "django.core.context_processors.auth",
105     "django.core.context_processors.debug",
106     "django.core.context_processors.i18n",
107     # Add STATIC_URL_PREFIX to the context
108     "xerxes.tools.context_processors.static",
109 )
110
111 LOGIN_URL = "/accounts/login/"
112 LOGIN_REDIRECT_URL = "/influences/"
113
114 # Allow authentication against the phpb user accounts
115
116 AUTHENTICATION_BACKENDS = (
117     'xerxes.auth.PhpBBBackend',
118     'django.contrib.auth.backends.ModelBackend',
119 )
120
121 AUTH_PROFILE_MODULE = 'base.UserProfile'
122
123 # Import local settings, that are specific to this installation. These
124 # can override any settings specified here.
125 try:
126     from localsettings import *
127 except ImportError:
128     pass
129
130 # vim: set sts=4 sw=4 expandtab: