When you install a new django application, you have to add/modify your settings.py module.
For a project I\'m trying to make that module a python subpackage and crea
If you prefer more magic than in my previous more_settings.modify()
approach, try this:
settings.py:
INSTALLED_APPS = ('whatever',)
import more_settings
more_settings.modify(globals())
more_settings.py:
def config(INSTALLED_APPS=(), **other_settings):
INSTALLED_APPS += ('another_app',)
del other_settings
return locals()
def modify(settings):
settings.update(config(**settings))
Pros: no need to refer to settings with dict notation
Cons: must define modified settings as kwargs for config()