forked from orbit-oss/flask
Support async template context processors
This is useful as there is contextual information that could be loaded via IO e.g. information from a database. This also matches Quart and hence makes the shared signature easier to manage.
This commit is contained in:
parent
72c85e80c8
commit
3f6b243cec
2 changed files with 5 additions and 2 deletions
|
|
@ -478,7 +478,7 @@ class Flask(App):
|
|||
for name in names:
|
||||
if name in self.template_context_processors:
|
||||
for func in self.template_context_processors[name]:
|
||||
context.update(func())
|
||||
context.update(self.ensure_sync(func)())
|
||||
|
||||
context.update(orig_ctx)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue