From 6e1daff6b9d4aaf18b4fb67494888a9eb5b47be7 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sun, 10 Feb 2008 15:46:57 +0100 Subject: [PATCH] * Let settings import localsettings if it exists, to allow for installation-specific settings. * Add a template for localsettings. * Set DEBUG to False (should be set to True in localsettings, if required). --- localsettings.py.tmpl | 5 +++++ settings.py | 15 +++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 localsettings.py.tmpl diff --git a/localsettings.py.tmpl b/localsettings.py.tmpl new file mode 100644 index 0000000..bf3ddb1 --- /dev/null +++ b/localsettings.py.tmpl @@ -0,0 +1,5 @@ +# Put any settings that are specific to this installation in here. +# Any settings from settings.py can be overridden. + +# For example, enable debugging by commenting in the following line. +#DEBUG = True diff --git a/settings.py b/settings.py index dfe7fce..9393d94 100644 --- a/settings.py +++ b/settings.py @@ -1,11 +1,14 @@ # Django settings for ee project. -from dbsettings import * import os +# Import database settings from a default file (so we can keep those out +# of git). +from dbsettings import * + PROJECT_DIR = os.path.dirname(__file__) -DEBUG = True +DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( @@ -115,4 +118,12 @@ AUTHENTICATION_BACKENDS = ( ) 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: -- 2.30.2