X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=settings.py;h=15de0b1e83fafd310d4bb4f3a68c2bd7c7e53535;hb=2bafdecf8655cc364597eb1b00f9c500c55da0a5;hp=9805d75b1607730f5ff19aa51323568b7af03566;hpb=50ca740ab12e8a9f7dd9b14ae4bb5280f1383d45;p=matthijs%2Fprojects%2Fxerxes.git diff --git a/settings.py b/settings.py index 9805d75..15de0b1 100644 --- a/settings.py +++ b/settings.py @@ -1,8 +1,14 @@ -# 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 = ( @@ -44,7 +50,7 @@ MEDIA_ROOT = '' MEDIA_URL = '' # URL prefix for static files. Will be made available by -# ee.tools.context_processors.static +# xerxes.tools.context_processors.static STATIC_URL_PREFIX = '/static/' # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a @@ -72,13 +78,13 @@ MIDDLEWARE_CLASSES = ( #'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 = ( @@ -87,10 +93,10 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', - 'ee.events', - 'ee.influences', - 'ee.base', - 'ee.tools', + 'xerxes.events', + 'xerxes.influences', + 'xerxes.base', + 'xerxes.tools', ) TEMPLATE_CONTEXT_PROCESSORS = ( @@ -98,7 +104,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.debug", "django.core.context_processors.i18n", # Add STATIC_URL_PREFIX to the context - "ee.tools.context_processors.static", + "xerxes.tools.context_processors.static", ) LOGIN_URL = "/accounts/login/" @@ -107,6 +113,17 @@ LOGIN_REDIRECT_URL = "/influences/" # Allow authentication against the phpb user accounts AUTHENTICATION_BACKENDS = ( - 'ee.auth.PhpBBBackend', + '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: