Created
October 4, 2011 01:14
-
-
Save zackdever/1260693 to your computer and use it in GitHub Desktop.
extend django settings.py variables in local_settings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/ | |
# settings.py | |
try: | |
LOCAL_SETTINGS | |
except NameError: | |
try: | |
from local_settings import * | |
except ImportError: | |
pass | |
# local_settings.py | |
LOCAL_SETTINGS = True | |
from settings import * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment