Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/flask/__pycache__/templating.cpython-37.pyc

52 lines
4.8 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
<00>/<2F>]K<00>@s<>dZddlmZddlmZddlmZddlmZddlmZddl m
Z
dd l m Z d
d <0B>Z Gd d <0A>d e<04>ZGdd<0F>de<02>Z dd<11>Zdd<13>Zdd<15>ZdS)z<>
flask.templating
~~~~~~~~~~~~~~~~
Implements the bridge to Jinja2.
:copyright: 2010 Pallets
:license: BSD-3-Clause
<EFBFBD>)<01>
BaseLoader)<01> Environment)<01>TemplateNotFound<6E>)<01>_app_ctx_stack)<01>_request_ctx_stack)<01>before_render_template)<01>template_renderedcCsBtj}tj}i}|dk r"|j|d<|dk r>|j|d<|j|d<|S)zSDefault template context processor. Injects `request`,
`session` and `g`.
N<>g<>request<73>session)r<00>toprr
r r )ZreqctxZappctx<74>rv<72>r<00>3/tmp/pip-install-c3kgu56x/Flask/flask/templating.py<70>_default_template_ctx_processors


rc@seZdZdZdd<03>ZdS)rz<>Works like a regular Jinja2 environment but has some additional
knowledge of how Flask's blueprint works so that it can prepend the
name of the blueprint to referenced templates if necessary.
cKs,d|kr|<01><00>|d<tj|f|<02>||_dS)N<>loader)Zcreate_global_jinja_loader<65>BaseEnvironment<6E>__init__<5F>app)<03>selfr<00>optionsrrrr*s zEnvironment.__init__N)<05>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rrrrrr$src@s@eZdZdZdd<03>Zdd<05>Zdd<07>Zdd <09>Zd
d <0B>Zd d <0A>Z dS)<0F>DispatchingJinjaLoaderz\A loader that looks for templates in the application and all
the blueprint folders.
cCs
||_dS)N)r)rrrrrr6szDispatchingJinjaLoader.__init__cCs$|jjdr|<00>||<02>S|<00>||<02>S)NZEXPLAIN_TEMPLATE_LOADING)r<00>config<69>_get_source_explained<65>_get_source_fast)r<00> environment<6E>templaterrr<00>
get_source9s  z!DispatchingJinjaLoader.get_sourcec Cs<>g}d}x\|<00>|<02>D]N\}}y|<06>||<02>}|dkr6|}Wntk
rPd}YnX|<03>|||f<03>qWddlm}||j||<03>|dk r<>|St|<02><01>dS)Nr)<01>!explain_template_loading_attempts)<07> _iter_loadersr"r<00>appendZ debughelpersr#r) rr r!<00>attemptsZtrvZsrcobjrrr#rrrr>s 
 z,DispatchingJinjaLoader._get_source_explainedc CsHx:|<00>|<02>D],\}}y |<04>||<02>Stk
r6w Yq Xq Wt|<02><01>dS)N)r$r"r)rr r!Z_srcobjrrrrrSs   z'DispatchingJinjaLoader._get_source_fastccsL|jj}|dk r|j|fVx*|j<00><02>D]}|j}|dk r(||fVq(WdS)N)r<00> jinja_loader<65>iter_blueprints)rr!r<00> blueprintrrrr$[s z$DispatchingJinjaLoader._iter_loaderscCsjt<00>}|jj}|dk r$|<01>|<02><04><00>x<|j<01><05>D].}|j}|dk r0x|<02><04>D]}|<01>|<04>qLWq0Wt|<01>S)N)<08>setrr'<00>update<74>list_templatesr(<00>add<64>list)r<00>resultrr)r!rrrr,esz%DispatchingJinjaLoader.list_templatesN)
rrrrrr"rrr$r,rrrrr1s
rcCs.tj|||d<01>|<00>|<01>}tj|||d<01>|S)z)Renders the template and fires the signal)r!<00>context)r<00>send<6E>renderr )r!r0rrrrr<00>_renderts
r3cKs*tj}|j<02>|<01>t|jj<05>|<00>||j<02>S)a<>Renders a template from the template folder with the given
context.
:param template_name_or_list: the name of the template to be
rendered, or an iterable with template names
the first one existing will be rendered
:param context: the variables that should be available in the
context of the template.
)rr r<00>update_template_contextr3<00> jinja_envZget_or_select_template)Ztemplate_name_or_listr0<00>ctxrrr<00>render_template}s
  r7cKs*tj}|j<02>|<01>t|jj<05>|<00>||j<02>S)aFRenders a template from the given template source string
with the given context. Template variables will be autoescaped.
:param source: the source code of the template to be
rendered
:param context: the variables that should be available in the
context of the template.
)rr rr4r3r5Z from_string)<03>sourcer0r6rrr<00>render_template_string<6E>s  r9N)rZjinja2rrrr<00>globalsrrZsignalsrr rrr3r7r9rrrr<00><module>
s        C