-
-
Save sashadev-sky/e0a03aafec46e885edd56a231f823aa8 to your computer and use it in GitHub Desktop.
Store application configuration in a Flask blueprint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@blueprint.record_once | |
def record_params(state): | |
"""Store app.config in blueprint when blueprint is registered on app.""" | |
app = state.app | |
blueprint.config = {key: value for key, value in app.config.iteritems()} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment