1 2 3 4
try: from local_settings import * except ImportError, exp: pass
Place this snippet at the bottom of your settings.py file, and if a local_settings.py file is present in the directory, all settings in that file will override those in settings.py
I love this snippet and have actually been using it for a while now… before it's posting here!
I first heard about it when Michael Trier mentioned it, saying that Magus suggested it in the IRC.
Thanks Magus, great timesaver.
#
Ah, that's perfect! Much more elegant than my method... which is too embarrassing to mention here.
Comments
I love this snippet and have actually been using it for a while now… before it's posting here!
I first heard about it when Michael Trier mentioned it, saying that Magus suggested it in the IRC.
Thanks Magus, great timesaver.
#
Ah, that's perfect! Much more elegant than my method... which is too embarrassing to mention here.
#