New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta Attribute for Requiring Settings #6
Meta Attribute for Requiring Settings #6
Conversation
@@ -63,6 +64,11 @@ Reference | |||
For example, ``acme`` would turn into settings like | |||
``ACME_SETTING_1``. | |||
|
|||
.. attribute:: required | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a .. versionadded:: 0.6
directive to the block?
Actually, now that I think about it, what would you think about a different API:
What |
Honestly, I'm not a fan; mainly because I can't think of a use case where you'd want to require a value and give it a default (since a default value means the user doesn't have to set one). |
Good point, forget what I said, we'll do this like you proposed. Do you think it would be sensible to also allow the arguments passed to the |
Yeah, that makes sense to me. I don't think we need to change anything though since |
Anything holding this up that I could take care of? |
Nope, sorry! |
Meta Attribute for Requiring Settings
This adds support for a new (optional)
AppConf.Meta
attribute named "required." The attribute is a list of (unprefixed) settings that must be defined. Not defining any of the settings will result in anImproperlyConfigured
exception being raised.