As far as I can tell, that solution is pretty efficient without requiring specific Django support ;)
On Wed, 1 Feb 2017 01:29:12 -0800 (PST)
Anthony King <
anthon...@gmail.com> wrote:
> Yesterday, I posted a new ticket asking about the potential for adding a
> standardised approach for packages to define default settings. [0]
>
> I was writing an app, and when looking for a way to set settings, there was
> no clear solution.
>
>
> Looking at what other projects do, the goto was something like this:
> #myapp/settings.py
> from django.conf import settings
> MYAPP_SOME_SETTING = getattr(settings, 'MYAPP_SOME_SETTING', 'default')
>
> This would then be accessed via myapp.settings, which will not reflect
> dynamic updates (specifically, override_settings).
>
>
> What I feel is needed is this:
> - have apps access their settings via django.conf.settings, always
> - Allow to define default settings as cleanly as it is for settings to be
> written for projects.
> - Allow for dynamic settings that are calculated by default, but can be
> overridden by the project. [1]
> *These are by no means final solutions. *I'm just looking to get the ball