Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Unable to render a template without request context #557
With the recent introduction of flask.app_context() it is now possible to have code running in the context of an app, but without having a web request active.
I would like to be able to use render_template while in an app context but there are some code paths that assume there is an active request context while doing so.
The following code snippets should be adapted:
It seems odd to not be able to render a template without a request, obviously the user has to make sure that templates rendered in an app context don't use request-related references but that seems quite reasonable.
Do you think this makes sense ? If yes, then i can provide a patch to do that, and if you think of any other issues related to this i'll be glad to fix them.