Skip to content

Instantly share code, notes, and snippets.

@brenj
brenj / blueprint.py
Created November 28, 2015 06:48
Store application configuration in a Flask blueprint.
@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()}