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