Interessant finde ich die Variante https://code.djangoproject.com/wiki/Spl ... ngsettings :
settings/__init__.py:
Code: Alles auswählen
INSTALLED_APPS = ('whatever',)
try:
from settings.local import *
except ImportError:
pass
Code: Alles auswählen
import sys
globals().update(vars(sys.modules['settings']))
INSTALLED_APPS += ('another_app',)
https://github.com/jedie/PyLucid/commit ... 44b1c4af3f
https://github.com/jedie/PyLucid-django ... ba4216f604
Zugegeben globals().update(vars(sys.modules['settings'])) sieht nach einem Hack aus, aber doch relativ klar und einfach gelöst ohne viel Magie. Was haltet ihr davon?