Skip to content

Instantly share code, notes, and snippets.

@sashadev-sky
Forked from brenj/blueprint.py
Created March 31, 2021 16:46
Show Gist options
  • Select an option

  • Save sashadev-sky/e0a03aafec46e885edd56a231f823aa8 to your computer and use it in GitHub Desktop.

Select an option

Save sashadev-sky/e0a03aafec46e885edd56a231f823aa8 to your computer and use it in GitHub Desktop.

Revisions

  1. Brendan J created this gist Nov 28, 2015.
    5 changes: 5 additions & 0 deletions blueprint.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    @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()}