More refactoring and moving stuff around

This commit is contained in:
Armin Ronacher 2010-07-04 14:01:56 +02:00
parent a3c9494f67
commit 665fa2a32b
3 changed files with 15 additions and 14 deletions

View file

@ -13,6 +13,18 @@ from jinja2 import BaseLoader, FileSystemLoader, TemplateNotFound
from flask.globals import _request_ctx_stack
def _default_template_ctx_processor():
"""Default template context processor. Injects `request`,
`session` and `g`.
"""
reqctx = _request_ctx_stack.top
return dict(
request=reqctx.request,
session=reqctx.session,
g=reqctx.g
)
class _DispatchingJinjaLoader(BaseLoader):
"""A loader that looks for templates in the application and all
the module folders.