Files
order/.venv/Lib/site-packages/flask/__pycache__/templating.cpython-312.pyc

53 lines
6.9 KiB
Plaintext
Raw Normal View History

2025-08-27 21:11:48 +08:00
<EFBFBD>
x<>gK<00><00><><00>dZddlmZddlmZddlmZddlmZddlmZddl m
Z
dd l m Z d
<EFBFBD>Z Gd <0B>d e<04>ZGd <0A>de<02>Z d<0F>Zd<10>Zd<11>Zy)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_renderedc<00><><00>tj}tj}i}|<01>|j|d<|<00>|j|d<|j
|d<|S)zSDefault template context processor. Injects `request`,
`session` and `g`.
<20>g<>request<73>session)r<00>toprr r r)<03>reqctx<74>appctx<74>rvs <20>9D:\mooc\order\.venv\Lib\site-packages\flask/templating.py<70>_default_template_ctx_processorrsW<00><00> <20> #<23> #<23>F<EFBFBD> <1B> <1F> <1F>F<EFBFBD> <0B>B<EFBFBD> <0A><19><18>(<28>(<28><02>3<EFBFBD><07> <0A><19><1E><0E><0E><02>9<EFBFBD> <0A><1E><0E><0E><02>9<EFBFBD> <0A> <0A>I<EFBFBD>c<00><00>eZdZdZd<02>Zy)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.
c <00>l<00>d|vr|j<00>|d<tj|fi|<02><01>||_y)N<>loader)<04>create_global_jinja_loader<65>BaseEnvironment<6E>__init__<5F>app)<03>selfr<00>optionss rrzEnvironment.__init__*s7<00><00> <13>7<EFBFBD> "<22> #<23> ><3E> ><3E> @<40>G<EFBFBD>H<EFBFBD> <1D><17> <20> <20><14>1<><17>1<><16><04>rN)<05>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r<00>rrrr$s <00><00><08>
rrc<00>4<00>eZdZdZd<02>Zd<03>Zd<04>Zd<05>Zd<06>Zd<07>Z y) <09>DispatchingJinjaLoaderz\A loader that looks for templates in the application and all
the blueprint folders.
c<00><00>||_y<00>N)r)rrs rrzDispatchingJinjaLoader.__init__6s <00><00><16><04>rc<00>|<00>|jjdr|j||<02>S|j||<02>S)N<>EXPLAIN_TEMPLATE_LOADING)r<00>config<69>_get_source_explained<65>_get_source_fast)r<00> environment<6E>templates r<00>
get_sourcez!DispatchingJinjaLoader.get_source9s9<00><00> <0F>8<EFBFBD>8<EFBFBD>?<3F>?<3F>5<> 6<><17>-<2D>-<2D>k<EFBFBD>8<EFBFBD>D<> D<><13>$<24>$<24>[<5B>(<28>;<3B>;rc<00><00>g}d}|j|<02>D]0\}} |j||<02>}|<04>|}|j|||f<03><00>2ddlm}||j ||<03>|<04>|St|<02><00>#t$rd}Y<00>LwxYw)Nr)<01>!explain_template_loading_attempts)<07> _iter_loadersr/r<00>append<6E> debughelpersr1r) rr-r.<00>attempts<74>trv<72>srcobjrrr1s rr+z,DispatchingJinjaLoader._get_source_explained>s<><00><00><15><08><12><03>"<22>0<>0<><18>:<3A>N<EFBFBD>F<EFBFBD>F<EFBFBD> <1A><1B>&<26>&<26>{<7B>H<EFBFBD>=<3D><02><16>;<3B><1C>C<EFBFBD> <15>O<EFBFBD>O<EFBFBD>V<EFBFBD>V<EFBFBD>R<EFBFBD>0<> 1<>;<3B> D<01>)<29>$<24>(<28>(<28>H<EFBFBD>h<EFBFBD>G<> <0E>?<3F><16>J<EFBFBD><1E>x<EFBFBD>(<28>(<28><>$<24> <1A><19><02> <1A>s<00>A2<02>2 B<05>?Bc<00><><00>|j|<02>D]\}} |j||<02>cSt|<02><00>#t$rY<00>2wxYwr')r2r/r)rr-r.<00>_srcobjrs rr,z'DispatchingJinjaLoader._get_source_fastSsT<00><00>#<23>1<>1<>(<28>;<3B>O<EFBFBD>G<EFBFBD>V<EFBFBD> <19><1D>(<28>(<28><1B>h<EFBFBD>?<3F>?<3F> <<3C>
<1F>x<EFBFBD>(<28>(<28><>$<24> <19><18> <19>s<00>9<02> A<05>Ac#<00><>K<00>|jj}|<02>|j|f<02><01>|jj<00>D]}|j}|<02><01>||f<02><01><00>y<00>wr')r<00> jinja_loader<65>iter_blueprints)rr.r<00> blueprints rr2z$DispatchingJinjaLoader._iter_loaders[s]<00><00><><00><15><18><18>&<26>&<26><06> <11> <1D><16>(<28>(<28>F<EFBFBD>"<22> "<22><1D><18><18>1<>1<>3<>I<EFBFBD><1E>+<2B>+<2B>F<EFBFBD><15>!<21><1F><16>'<27>'<27>4<>s <00>AA <01> A c<00>B<00>t<00>}|jj}|<02>|j|j <00><00>|jj <00>D]7}|j}|<02><01>|j <00>D]}|j |<04><00><00>9t|<01>Sr')<08>setrr;<00>update<74>list_templatesr<<00>add<64>list)r<00>resultrr=r.s rrAz%DispatchingJinjaLoader.list_templateses<><00><00><14><15><06><15><18><18>&<26>&<26><06> <11> <1D> <12>M<EFBFBD>M<EFBFBD>&<26>/<2F>/<2F>1<> 2<><1D><18><18>1<>1<>3<>I<EFBFBD><1E>+<2B>+<2B>F<EFBFBD><15>!<21> &<26> 5<> 5<> 7<>H<EFBFBD><1A>J<EFBFBD>J<EFBFBD>x<EFBFBD>(<28>!8<>4<> <14>F<EFBFBD>|<7C>rN)
rr r!r"rr/r+r,r2rAr#rrr%r%1s%<00><00><08><17><<3C>
)<29>*)<29>(<28> rr%c<00><><00>tj|||<01><01>|j|<01>}tj|||<01><01>|S)z)Renders the template and fires the signal)r.<00>context)r <00>send<6E>renderr
)r.rFrrs r<00>_renderrIts;<00><00><1B><1F><1F><03>h<EFBFBD><07>H<> <11><1F><1F><17> !<21>B<EFBFBD><15><1A><1A>3<EFBFBD><18>7<EFBFBD>C<> <0A>Irc <00><><00>tj}|jj|<01>t |jj
j |<00>||j<00>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.
)rrr<00>update_template_contextrI<00> jinja_env<6E>get_or_select_template)<03>template_name_or_listrF<00>ctxs r<00>render_templaterP}sQ<00><00> <19>
<1C>
<1C>C<EFBFBD><07>G<EFBFBD>G<EFBFBD>#<23>#<23>G<EFBFBD>,<2C> <12> <0B><07><07><19><19>0<>0<>1F<31>G<><0F> <0B><07><07> <06>rc <00><><00>tj}|jj|<01>t |jj
j |<00>||j<00>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.
)rrrrKrIrL<00> from_string)<03>sourcerFrOs r<00>render_template_stringrT<00>sI<00><00> <19>
<1C>
<1C>C<EFBFBD><07>G<EFBFBD>G<EFBFBD>#<23>#<23>G<EFBFBD>,<2C> <12>3<EFBFBD>7<EFBFBD>7<EFBFBD>$<24>$<24>0<>0<><16>8<>'<27>3<EFBFBD>7<EFBFBD>7<EFBFBD> K<>KrN)r"<00>jinja2rrrr<00>globalsrr<00>signalsr r
rr%rIrPrTr#rr<00><module>rXsQ<00><01><04><1E>1<>#<23>#<23>'<27>+<2B>&<26> <0E>
<17>/<2F>
<17>@<1C>Z<EFBFBD>@<1C>F<0E><06>& Lr