On 09/26/2013 09:02 AM, Michael Manfre wrote:
> I don't think there will ever be a true consensus. I predict that the
> option that would leave the least number of people unhappy is a settings
> API that allows for 3rd party settings backends. Having settings in the
> environment is ideal for deployments, but what each project and admin
> consider to be the environment will probably not be the same.
> 
> Adding support for a settings API shouldn't be too difficult (tm).
> LazySettings gives us a nice place to hook in and import a 3rd party
> SettingsBackend. DJANGO_SETTINGS_MODULE already defines a workable way
> of choosing which settings to load. We'd need to define a way of
> structuring its value to specify which backend to load and provide it
> with enough information to get going. A URL format would work well for
> almost every type of settings backend that I could think of. In addition
> to the same basic settings behaviors, a SettingsBackend would need to
> add reload() and save().

I agree that there's unlikely to be consensus anytime soon on One Right
Way to handle configuration (as evidenced by this very thread).

I think your proposal needs stronger justification, though. We already
_have_ a "settings API": you can do whatever you want to load your
settings, as long as in the end you provide Django with a Python module
object populated with names and values. There are several existing
third-party projects building on this "API" to provide more opinionated
and featureful configuration handling (django-configurator,
django-configglue, django-configurations).

This API has limitations, sure, but it also has two advantages: it's
quite simple, and everyone's already adjusted to it. I think any
proposal to build a more complex system into Django core needs to
clearly explain what it allows you to do better than the current API.

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to