* Add 404 and 500 templates for displaying pretty page not found and server error...
[matthijs/projects/xerxes.git] / settings.py
index 7b4a4a63e866d58761b783a8f22f2bb64ec5ae6e..9393d9494882b9fae7dd0883e9edfca9f03b3c3b 100644 (file)
@@ -1,8 +1,14 @@
 # Django settings for ee project.
 
+import os
+
+# Import database settings from a default file (so we can keep those out
+# of git).
 from dbsettings import *
 
-DEBUG = True
+PROJECT_DIR = os.path.dirname(__file__)
+
+DEBUG = False
 TEMPLATE_DEBUG = DEBUG
 
 ADMINS = (
@@ -25,8 +31,8 @@ TIME_ZONE = 'Europe/Amsterdam'
 #LANGUAGE_CODE = 'en-us'
 LANGUAGE_CODE = 'nl'
 LANGUAGES = (
-    ('en', 'English'),
     ('nl', 'Nederlands'),
+    ('en', 'English'),
 )
 
 SITE_ID = 1
@@ -67,6 +73,9 @@ MIDDLEWARE_CLASSES = (
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.middleware.doc.XViewMiddleware',
+    # Let's keep this disabled (until we can offer language selection to
+    # users).
+    #'django.middleware.locale.LocaleMiddleware',
 )
 
 ROOT_URLCONF = 'ee.urls'
@@ -75,7 +84,7 @@ TEMPLATE_DIRS = (
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
-    '/home/matthijs/docs/src/django/ee/templates',
+    os.path.join(PROJECT_DIR, 'templates'),
 )
 
 INSTALLED_APPS = (
@@ -87,6 +96,7 @@ INSTALLED_APPS = (
     'ee.events',
     'ee.influences',
     'ee.base',
+    'ee.tools',
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = (
@@ -106,3 +116,14 @@ AUTHENTICATION_BACKENDS = (
     'ee.auth.PhpBBBackend',
     'django.contrib.auth.backends.ModelBackend',
 )
+
+AUTH_PROFILE_MODULE = 'base.UserProfile'
+
+# Import local settings, that are specific to this installation. These
+# can override any settings specified here.
+try:
+    from localsettings import *
+except ImportError:
+    pass
+
+# vim: set sts=4 sw=4 expandtab: