Currently, all the names defined within AppConf are prefixed in the same way when accessed from django.conf.settings. For:
class MyAppConf(AppConf):
PUBLIC_SETTING = ...
_PRIVATE_SETTING = ...
class Meta:
prefix = "my_app"
PUBLIC_SETTING can be accessed by MY_APP_PUBLIC_SETTING, whereas _PRIVATE_SETTING goes as MY_APP__PRIVATE_SETTING.
I think that an alternative way for the second case would be to add an underscore before the full (i.e. prefixed by the AppConf.Meta prefix) name. So finally this would be: _MY_APP_PRIVATE_SETTING.
Why is this better? IMO, this preserves the "privacy" of the original AppConf attribute.
Alternatively underscore-prefixed settings can be set as inaccessible from the django.conf.settings (see #98).
Currently, all the names defined within
AppConf
are prefixed in the same way when accessed fromdjango.conf.settings
. For:PUBLIC_SETTING
can be accessed byMY_APP_PUBLIC_SETTING
, whereas_PRIVATE_SETTING
goes asMY_APP__PRIVATE_SETTING
.I think that an alternative way for the second case would be to add an underscore before the full (i.e. prefixed by the
AppConf.Meta
prefix) name. So finally this would be:_MY_APP_PRIVATE_SETTING
.Why is this better? IMO, this preserves the "privacy" of the original
AppConf
attribute.Alternatively underscore-prefixed settings can be set as inaccessible from the
django.conf.settings
(see #98).