X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=settings.py;h=f23d20c4c62e66c03ae4a808ad4ec928320c40c0;hb=refs%2Fheads%2Fproduction-master-something;hp=7d91bf193d1b2c1ef63d59c7910bdb1d1b5926d8;hpb=c5cbeefd03ddece1d37e966ad0b6f56ece29113f;p=matthijs%2Fprojects%2Fxerxes.git diff --git a/settings.py b/settings.py index 7d91bf1..f23d20c 100644 --- a/settings.py +++ b/settings.py @@ -1,12 +1,19 @@ -# Django settings for ee project. +# Django settings for xerxes 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 = ( - # ('Your Name', 'your_email@domain.com'), + # Server errors get sent here + ('Matthijs Kooijman', 'matthijs@stdin.nl'), ) MANAGERS = ADMINS @@ -25,8 +32,8 @@ TIME_ZONE = 'Europe/Amsterdam' #LANGUAGE_CODE = 'en-us' LANGUAGE_CODE = 'nl' LANGUAGES = ( - ('en', 'English'), ('nl', 'Nederlands'), + ('en', 'English'), ) SITE_ID = 1 @@ -43,6 +50,10 @@ MEDIA_ROOT = '' # Example: "http://media.lawrence.com" MEDIA_URL = '' +# URL prefix for static files. Will be made available by +# xerxes.tools.context_processors.static +STATIC_URL_PREFIX = '/static/' + # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. # Examples: "http://foo.com/media/", "/media/". @@ -63,15 +74,18 @@ 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' +ROOT_URLCONF = 'xerxes.urls' 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 = ( @@ -80,15 +94,18 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', - 'ee.events', - 'ee.influences', - 'ee.base', + 'xerxes.events', + 'xerxes.influences', + 'xerxes.base', + 'xerxes.tools', ) TEMPLATE_CONTEXT_PROCESSORS = ( - "django.core.context_processors.auth", - "django.core.context_processors.debug", - "django.core.context_processors.i18n", + "django.core.context_processors.auth", + "django.core.context_processors.debug", + "django.core.context_processors.i18n", + # Add STATIC_URL_PREFIX to the context + "xerxes.tools.context_processors.static", ) LOGIN_URL = "/accounts/login/" @@ -97,6 +114,17 @@ LOGIN_REDIRECT_URL = "/influences/" # Allow authentication against the phpb user accounts AUTHENTICATION_BACKENDS = ( - 'ee.auth.PhpBBBackend', - 'django.contrib.auth.backends.ModelBackend', + 'xerxes.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: