Only allow users to add NPC or Player characters.
[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 = False
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 # If you set this to False, Django will make some optimizations so as not
40 # to load the internationalization machinery.
41 USE_I18N = True
42
43 # Absolute path to the directory that holds media.
44 # Example: "/home/media/media.lawrence.com/"
45 MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
46
47 # URL that handles the media served from MEDIA_ROOT.
48 # Example: "http://media.lawrence.com"
49 MEDIA_URL = '/media/'
50
51 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
52 # trailing slash.
53 # Examples: "http://foo.com/media/", "/media/".
54 ADMIN_MEDIA_PREFIX = '/admin/media/'
55
56 # Make this unique, and don't share it with anybody.
57 SECRET_KEY = '6-zo+-1@-342%k4%82aw#kxr4f%5w00xhwby5$&fa@+!dh@(2='
58
59 # List of callables that know how to import templates from various sources.
60 TEMPLATE_LOADERS = (
61     'django.template.loaders.filesystem.load_template_source',
62     'django.template.loaders.app_directories.load_template_source',
63 #     'django.template.loaders.eggs.load_template_source',
64 )
65
66 MIDDLEWARE_CLASSES = (
67     'django.middleware.common.CommonMiddleware',
68     'django.contrib.sessions.middleware.SessionMiddleware',
69     'django.contrib.auth.middleware.AuthenticationMiddleware',
70     'django.middleware.doc.XViewMiddleware',
71     # Let's keep this disabled (until we can offer language selection to
72     # users).
73     #'django.middleware.locale.LocaleMiddleware',
74 )
75
76 ROOT_URLCONF = 'xerxes.urls'
77
78 TEMPLATE_DIRS = (
79     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
80     # Always use forward slashes, even on Windows.
81     # Don't forget to use absolute paths, not relative paths.
82     os.path.join(PROJECT_DIR, 'templates'),
83 )
84
85 INSTALLED_APPS = (
86     'django.contrib.auth',
87     'django.contrib.contenttypes',
88     'django.contrib.sessions',
89     'django.contrib.admin',
90     'xerxes.events',
91     'xerxes.influences',
92     'xerxes.base',
93     'xerxes.tools',
94     'threadedcomments',
95 )
96
97 TEMPLATE_CONTEXT_PROCESSORS = (
98     "django.core.context_processors.auth",
99     "django.core.context_processors.debug",
100     "django.core.context_processors.i18n",
101     "django.core.context_processors.media",
102     "django.core.context_processors.request",
103 )
104
105 LOGIN_URL = "/accounts/login/"
106 LOGIN_REDIRECT_URL = "/influences/"
107
108 # Allow authentication against the phpb user accounts
109
110 AUTHENTICATION_BACKENDS = (
111     'xerxes.auth.PhpBBBackend',
112     'django.contrib.auth.backends.ModelBackend',
113 )
114
115 AUTH_PROFILE_MODULE = 'base.UserProfile'
116
117 # Max length for comments, in characters.
118 DEFAULT_MAX_COMMENT_LENGTH = 3000
119
120 INTERNAL_IPS = ('127.0.0.1')
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: