def set_jinja2(jinja2, key=_registry_key, app=None):
"""Sets an instance of :class:`Jinja2` in the app registry.
:param store:
An instance of :class:`Jinja2`.
:param key:
The key used to retrieve the instance from the registry. A default
is used if it is not set.
:param request:
A :class:`webapp2.WSGIApplication` instance used to retrieve the
instance. The active app is used if it is not set.
"""
app = app or webapp2.get_app()
app.registry[key] = jinja2
评论列表
文章目录