1 2 3 4 | try:
from local_settings import *
except ImportError, exp:
pass
|
More like this
- Read settings from local_settings.py by statico 2 years ago
- Different approach to local settings.py by jokull 3 years, 11 months ago
- Load local settings by ofalk 2 years, 8 months ago
- Load a local settings file for dev/test environments by menendez 3 years, 6 months ago
- Dynamically maintain local_constants.py from South migration by menendez 1 year, 10 months ago
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.
#