Skip to content

Instantly share code, notes, and snippets.

@diegoquintanav
Created January 25, 2018 16:00
Show Gist options
  • Save diegoquintanav/45cef416ce5e8cc819afd12b91eac2e5 to your computer and use it in GitHub Desktop.
Save diegoquintanav/45cef416ce5e8cc819afd12b91eac2e5 to your computer and use it in GitHub Desktop.
get Flask context
>>> from hello import app
>>> from flask import current_app
>>> app_ctx = app.app_context()
>>> app_ctx.push()
>>> current_app.name
>>> app_ctx.pop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment