4 ms·
The guy who wrote django-compressor fairly recently released a library to address the settings.py problem, django-configurations https://django-configurations.r
by xaritas 14y ago
The guy who wrote django-compressor fairly recently released a library to address the settings.py problem, django-configurations https://django-configurations.readthedocs.org/en/latest/ https://django-configurations.readthedocs.org/en/latest/
It uses classes to define your settings, and you can use inheritance to override and mixins to augment your bits of configuration. I usually have a "CommonSettings" class, with a few others extending it (Production, Development, etc.). At runtime the correct class is set based on an environment variable (you have to add a line or two to manage.py and wsgi.py to start the magic).
Anyway, it doesn't seem that popular but I've enjoyed using it (and done so without problem).