https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/flask/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/flask/templating.pyc
�
-/�_c@s�dZddlmZddlmZddlmZddlmZddlmZddl	m
Z
dd	l	mZd
�Zdefd��YZd
efd��YZ
d�Zd�Zd�ZdS(s�
    flask.templating
    ~~~~~~~~~~~~~~~~

    Implements the bridge to Jinja2.

    :copyright: 2010 Pallets
    :license: BSD-3-Clause
i����(t
BaseLoader(tEnvironment(tTemplateNotFoundi(t_app_ctx_stack(t_request_ctx_stack(tbefore_render_template(ttemplate_renderedcCsatj}tj}i}|dk	r4|j|d<n|dk	r]|j|d<|j|d<n|S(sSDefault template context processor.  Injects `request`,
    `session` and `g`.
    tgtrequesttsessionN(RttopRtNoneRRR	(treqctxtappctxtrv((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pyt_default_template_ctx_processors		
RcBseZdZd�ZRS(s�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|j�|d<ntj||�||_dS(Ntloader(tcreate_global_jinja_loadertBaseEnvironmentt__init__tapp(tselfRtoptions((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pyR*s(t__name__t
__module__t__doc__R(((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pyR$stDispatchingJinjaLoadercBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(s\A loader that looks for templates in the application and all
    the blueprint folders.
    cCs
||_dS(N(R(RR((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pyR6scCs0|jjdr |j||�S|j||�S(NtEXPLAIN_TEMPLATE_LOADING(Rtconfigt_get_source_explainedt_get_source_fast(Rtenvironmentttemplate((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pyt
get_source9sc	Cs�g}d}xx|j|�D]g\}}y+|j||�}|dkrR|}nWntk
rld}nX|j|||f�qWddlm}||j||�|dk	r�|St|��dS(Ni(t!explain_template_loading_attempts(Rt
_iter_loadersR!RtappendtdebughelpersR"R(	RRR tattemptsttrvtsrcobjRRR"((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pyR>s


cCs[xH|j|�D]7\}}y|j||�SWqtk
rFqqXqWt|��dS(N(R#R!R(RRR t_srcobjR((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pyRSs
ccsj|jj}|dk	r)|j|fVnx:|jj�D])}|j}|dk	r9||fVq9q9WdS(N(Rtjinja_loaderRtiter_blueprints(RR Rt	blueprint((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pyR#[s	cCs�t�}|jj}|dk	r7|j|j��nxS|jj�D]B}|j}|dk	rGx$|j�D]}|j|�qoWqGqGWt|�S(N(	tsetRR*Rtupdatetlist_templatesR+taddtlist(RtresultRR,R ((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pyR/es		(	RRRRR!RRR#R/(((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pyR1s					
cCsEtj|d|d|�|j|�}tj|d|d|�|S(s)Renders the template and fires the signalR tcontext(RtsendtrenderR(R R3RR((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pyt_rendertscKs;tj}|jj|�t|jjj|�||j�S(s�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
Rtupdate_template_contextR6t	jinja_envtget_or_select_template(ttemplate_name_or_listR3tctx((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pytrender_template}s
	cKs;tj}|jj|�t|jjj|�||j�S(sFRenders 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
RR7R6R8tfrom_string(tsourceR3R;((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pytrender_template_string�s		N(Rtjinja2RRRRtglobalsRRtsignalsRRRRR6R<R?(((s1/tmp/pip-install-sTXtzD/flask/flask/templating.pyt<module>
s	
C			

https://t.me/AnonymousX5 - 2025