diff options
author | Dan McGee <dan@archlinux.org> | 2010-10-05 11:55:30 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-10-05 11:55:30 -0500 |
commit | 2b8f7772aded961c376979f14cf95e6da5eb280f (patch) | |
tree | 23ea157065e7ccdc38a63181182daa7041e6677c /settings.py | |
parent | 3972ba3bd28a3c379649df7f6805bd2a6ef3c5f8 (diff) |
Make it possible to override settings
By importing local settings at the end, you can override settings specified
in settings.py. Helpful for something like the Django debug toolbar. The
template loader needs to come last, however, in order to respect the
TEMPLATE_DEBUG setting.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'settings.py')
-rw-r--r-- | settings.py | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/settings.py b/settings.py index ea87c2cd..2334a47c 100644 --- a/settings.py +++ b/settings.py @@ -1,12 +1,15 @@ import os # Django settings for archweb project. -## Import local settings -from local_settings import * - ## Set the debug values +DEBUG = False TEMPLATE_DEBUG = DEBUG +## Notification admins +ADMINS = ( + ('Dan McGee', 'dan@archlinux.org'), +) + # Set managers to admins MANAGERS = ADMINS @@ -90,12 +93,6 @@ TEMPLATE_LOADERS = ( 'django.template.loaders.app_directories.Loader', ) -# Enable caching templates in production environments -if not TEMPLATE_DEBUG: - TEMPLATE_LOADERS = ( - ('django.template.loaders.cached.Loader', TEMPLATE_LOADERS), - ) - # Set django's User stuff to use our profile model # format is app.model AUTH_PROFILE_MODULE = 'main.UserProfile' @@ -123,4 +120,13 @@ INSTALLED_APPS = ( 'south', # database migration support ) +## Import local settings +from local_settings import * + +# Enable caching templates in production environments +if not TEMPLATE_DEBUG: + TEMPLATE_LOADERS = ( + ('django.template.loaders.cached.Loader', TEMPLATE_LOADERS), + ) + # vim: set ts=4 sw=4 et: |