Open paduszyk opened 2 weeks ago
Hi @paduszyk. Django settings doesn't really have any concept of private settings. AppConf already scopes settings to a particular app, but I'm not sure going further than that is really in scope here.
@carltongibson OK 👍🏻 Maybe the name "private settings" is misleading... By private I meant "seen" only by the AppConf
instance. You can access them from myapp.conf.settings
, but not from django.conf.settings
.
But why not just regular attributes in that case?
I'm not really seeing how the need here ties in with AppConf's role as providing scoped Django settings, which are globals essentially.
Hi 👋🏻
I'd to share an idea for private settings, a new feature for the
django-appconf
.Consider the following example:
In the current implementation,
PUBLIC
and_PRIVATE
are accessible fromdjango.conf.settings
viaMY_APP_PUBLIC
, whereasMY_APP__PRIVATE
. My idea is to make_PRIVATE
inaccessible as it is considered to be private.I see two ways we could implement this.
Meta
(private
, let us say) that could be a list of names for private settings.This could be useful (and elegant/Pythonic IMHO) for adding configurations specific to the configured app. What's your opinion?
If you find this idea interesting, I can open a PR.