﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22697	Add a public API for extending Settings	Ben Davis	nobody	"Django currently has `conf.settings.configure()` as a way to configure settings manually, and a typical use case is documented for this:
{{{
#!python

settings.configure(DEBUG=True, TEMPLATE_DEBUG=True,
    TEMPLATE_DIRS=('/home/web-apps/myapp', '/home/web-apps/base'))
}}}

This use case is represented by `UserSettingsHolder`. However, I think another case where one would want to use `Settings`, but with some customization. `UserSettingsHolder` is not well suited to this. I think this could easily be remedied adding a `settings_class` keyword argument to `configure()`, which defaults to `UserSettingsHolder`. Essentially, `LazySettings.configure()` would look like this:


{{{
#!python

    def configure(self, default_settings=global_settings, settings_class=None, **options):
        if self._wrapped is not empty:
            raise RuntimeError('Settings already configured.')
        if settings_class is None:
            settings_class = UserSettinsgHolder
        holder = settings_class(default_settings)
        for name, value in options.items():
            setattr(holder, name, value)
        self._wrapped = holder

}}}
"	New feature	closed	Uncategorized		Normal	needsinfo			Unreviewed	0	0	0	0	0	0
