Files
loustique-home/venv/lib/python3.11/site-packages/flask/__pycache__/templating.cpython-311.pyc

92 lines
10 KiB
Plaintext
Raw Normal View History

2026-03-21 10:53:02 +01:00
<EFBFBD>
<00><><EFBFBD>i<EFBFBD><00><01>@<00>ddlmZddlZddlmZddlmZddlmZddlm Z ddl
m Z dd l
m Z dd
l
m Z dd l
mZdd lmZdd lmZddlmZejrddlmZddlmZddlmZd*d<14>ZGd<15>de<07><00>ZGd<17>de<05><00>Zd+d<1F>Zd,d#<23>Zd-d%<25>Zd.d'<27>Z d/d(<28>Z!d0d)<29>Z"dS)1<>)<01> annotationsN)<01>
BaseLoader)<01> Environment)<01>Template)<01>TemplateNotFound<6E>)<01>_cv_app)<01> _cv_request)<01> current_app)<01>request)<01>stream_with_context)<01>before_render_template)<01>template_rendered)<01>Flask)<01>App)<01>Scaffold<6C>return<72>dict[str, t.Any]c<01><><00>tjd<01><00>}tjd<01><00>}i}|<00>
|j|d<|<01>
|j|d<|S)z<>Default template context processor. Replaces the ``request`` and ``g``
proxies with their concrete objects for faster access.
N<>gr )r <00>getr
rr )<03>appctx<74>reqctx<74>rvs <20>\/home/maxime/Documents/loustiques-home/venv/lib/python3.11/site-packages/flask/templating.py<70>_default_template_ctx_processorrsP<00><00><15>[<5B><14> <1E> <1E>F<EFBFBD> <18>_<EFBFBD>T<EFBFBD> "<22> "<22>F<EFBFBD><1D>B<EFBFBD> <0A><19><18>(<28><02>3<EFBFBD><07> <0A><19><1E><0E><02>9<EFBFBD> <0A> <0E>I<EFBFBD>c<01><00>eZdZdZd
d<08>Zd S) rz<>Works like a regular Jinja 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.
<20>appr<00>options<6E>t.Anyr<00>Nonec <01>n<00>d|vr|<01><00><00>|d<tj|fi|<02><01>||_dS)N<>loader)<04>create_global_jinja_loader<65>BaseEnvironment<6E>__init__r)<03>selfrr s rr'zEnvironment.__init__.sG<00><00> <13>7<EFBFBD> "<22> "<22> #<23> ><3E> ><3E> @<40> @<40>G<EFBFBD>H<EFBFBD> <1D><17> <20><14>1<>1<><17>1<>1<>1<><16><04><08><08>rN)rrr r!rr")<05>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r'<00>rrrr(s2<00><00><00><00><00><00><08><08>
<17><17><17><17><17>rrc<01>B<00>eZdZdZdd<06>Zdd <0C>Zdd <0A>Zdd<0E>Zdd<10>Zdd<12>Z dS)<18>DispatchingJinjaLoaderz\A loader that looks for templates in the application and all
the blueprint folders.
rrrr"c<01><00>||_dS<00>N)r)r(rs rr'zDispatchingJinjaLoader.__init__:s <00><00><16><04><08><08>r<00> environmentr&<00>template<74>str<74>3tuple[str, str | None, t.Callable[[], bool] | None]c<01>~<00>|jjdr|<00>||<02><00>S|<00>||<02><00>S)N<>EXPLAIN_TEMPLATE_LOADING)r<00>config<69>_get_source_explained<65>_get_source_fast)r(r2r3s r<00>
get_sourcez!DispatchingJinjaLoader.get_source=sC<00><00> <10>8<EFBFBD>?<3F>5<> 6<> E<01><17>-<2D>-<2D>k<EFBFBD>8<EFBFBD>D<>D<> D<><13>$<24>$<24>[<5B>(<28>;<3B>;<3B>;rc<01>"<00>g}d}|<00>|<02><00>D]K\}} |<06>||<02><00>}|<04>|}n#t$rd}YnwxYw|<03>|||f<03><00><00>Lddlm}||j||<03><00>|<04>|St|<02><00><00>)Nr)<01>!explain_template_loading_attempts)<07> _iter_loadersr;r<00>append<6E> debughelpersr=r) r(r2r3<00>attempts<74>trv<72>srcobjr$rr=s rr9z,DispatchingJinjaLoader._get_source_explainedDs<><00><00><16><08>LP<4C><03>"<22>0<>0<><18>:<3A>:<3A> 2<> 2<>N<EFBFBD>F<EFBFBD>F<EFBFBD> <1A><1B>&<26>&<26>{<7B>H<EFBFBD>=<3D>=<3D><02><16>;<3B><1C>C<EFBFBD><43><EFBFBD>#<23> <1A> <1A> <1A><19><02><02><02> <1A><><EFBFBD><EFBFBD> <14>O<EFBFBD>O<EFBFBD>V<EFBFBD>V<EFBFBD>R<EFBFBD>0<> 1<> 1<> 1<> 1<>C<>C<>C<>C<>C<>C<>)<29>)<29>$<24>(<28>H<EFBFBD>h<EFBFBD>G<>G<>G<> <0E>?<3F><16>J<EFBFBD><1E>x<EFBFBD>(<28>(<28>(s<00>;<02> A
<05> A
c<01><><00>|<00>|<02><00>D]-\}} |<04>||<02><00>cS#t$rY<00>*wxYwt|<02><00><00>r1)r>r;r)r(r2r3<00>_srcobjr$s rr:z'DispatchingJinjaLoader._get_source_fast\st<00><00> $<24>1<>1<>(<28>;<3B>;<3B> <19> <19>O<EFBFBD>G<EFBFBD>V<EFBFBD> <19><1D>(<28>(<28><1B>h<EFBFBD>?<3F>?<3F>?<3F>?<3F>?<3F><>#<23> <19> <19> <19><18><08> <19><><EFBFBD><EFBFBD><1E>x<EFBFBD>(<28>(<28>(s<00>4<02>
A<05>A<05>'t.Iterator[tuple[Scaffold, BaseLoader]]c#<01><>K<00>|jj}|<02> |j|fV<00>|j<00><00><00>D]}|j}|<02>||fV<00><00>dSr1)r<00> jinja_loader<65>iter_blueprints)r(r3r$<00> blueprints rr>z$DispatchingJinjaLoader._iter_loadersfsp<00><00><00><00><15><18>&<26><06> <11> <1D><16>(<28>F<EFBFBD>"<22> "<22> "<22> "<22><1D><18>1<>1<>3<>3<> (<28> (<28>I<EFBFBD><1E>+<2B>F<EFBFBD><15>!<21><1F><16>'<27>'<27>'<27>'<27><> (<28> (r<00> list[str]c<01>H<00>t<00><00>}|jj}|<02>'|<01>|<02><00><00><00><00>|j<00><00><00>D]7}|j}|<02>,|<02><00><00>D]}|<01>|<04><00><00><18>8t|<01><00>Sr1)<08>setrrH<00>update<74>list_templatesrI<00>add<64>list)r(<00>resultr$rJr3s rrOz%DispatchingJinjaLoader.list_templatesps<><00><00><14><15><15><06><15><18>&<26><06> <11> <1D> <12>M<EFBFBD>M<EFBFBD>&<26>/<2F>/<2F>1<>1<> 2<> 2<> 2<><1D><18>1<>1<>3<>3<> )<29> )<29>I<EFBFBD><1E>+<2B>F<EFBFBD><15>!<21> &<26> 5<> 5<> 7<> 7<>)<29>)<29>H<EFBFBD><1A>J<EFBFBD>J<EFBFBD>x<EFBFBD>(<28>(<28>(<28>(<28><><13>F<EFBFBD>|<7C>|<7C>rN)rrrr")r2r&r3r4rr5)r3r4rrF)rrK)
r)r*r+r,r'r;r9r:r>rOr-rrr/r/5s<><00><00><00><00><00><00><08><08><17><17><17><17><<3C><<3C><<3C><<3C>)<29>)<29>)<29>)<29>0)<29>)<29>)<29>)<29>(<28>(<28>(<28>(<28> <1C> <1C> <1C> <1C> <1C> rr/rrr3r<00>contextr4c<01><><00>|<00>|<02><00>tj||j||<02><01><00>|<01>|<02><00>}t j||j||<02><01><00>|S<00>N<><03>_async_wrapperr3rS)<06>update_template_contextr<00>send<6E> ensure_sync<6E>renderr)rr3rSrs r<00>_renderr\sz<00><00><07><1F><1F><07>(<28>(<28>(<28><1A><1F> <0B>C<EFBFBD>O<EFBFBD>h<EFBFBD><07><06><06><06><06>
<12><1F><1F><17> !<21> !<21>B<EFBFBD><15><1A> <0B>C<EFBFBD>O<EFBFBD>h<EFBFBD><07><06><06><06><06> <0E>Ir<00>template_name_or_list<73>%str | Template | list[str | Template]r!c <01>~<00>tj<00><00>}|j<00>|<00><00>}t |||<01><00>S)aRender a template by name with the given context.
:param template_name_or_list: The name of the template to render. If
a list is given, the first name to exist will be rendered.
:param context: The variables to make available in the template.
)r <00>_get_current_object<63> jinja_env<6E>get_or_select_templater\<00>r]rSrr3s r<00>render_templaterd<00>s:<00><00> <16>
)<29>
+<2B>
+<2B>C<EFBFBD><12>}<7D>3<>3<>4I<34>J<>J<>H<EFBFBD> <12>3<EFBFBD><08>'<27> *<2A> *<2A>*r<00>sourcec <01>~<00>tj<00><00>}|j<00>|<00><00>}t |||<01><00>S)z<>Render a template from the given source string with the given
context.
:param source: The source code of the template to render.
:param context: The variables to make available in the template.
)r r`ra<00> from_stringr\<00>rerSrr3s r<00>render_template_stringri<00>s9<00><00> <16>
)<29>
+<2B>
+<2B>C<EFBFBD><12>}<7D>(<28>(<28><16>0<>0<>H<EFBFBD> <12>3<EFBFBD><08>'<27> *<2A> *<2A>*r<00>t.Iterator[str]c<01><><00><00><01><02><00><00><00><02><00>tj<00><00>j<00><01><02><01><00>d<05><00><02>fd<04> }|<03><00>}trt |<04><00>}|S)NrVrrjc3<01>|<00>K<00><00><02><00><01><00>Ed{V<00><02>tj<00><00>j<00><02><01><01><00>dSrU)<04>generaterrYrZ)rrSr3s<00><><EFBFBD>rrmz_stream.<locals>.generate<74>s\<00><><00><00><00><1B>$<24>$<24>W<EFBFBD>-<2D>-<2D>-<2D>-<2D>-<2D>-<2D>-<2D>-<2D>-<2D><19><1E> <0F><03><0F>(<28>G<EFBFBD>
<EFBFBD>
<EFBFBD>
<EFBFBD>
<EFBFBD>
<EFBFBD>
r)rrj)rXrrYrZr r )rr3rSrmrs``` r<00>_streamrn<00>s<><00><><EFBFBD><EFBFBD><00><08><1F><1F><07>(<28>(<28>(<28><1A><1F> <0B>C<EFBFBD>O<EFBFBD>h<EFBFBD><07><06><06><06><06>
<EFBFBD>
<EFBFBD>
<EFBFBD>
<EFBFBD>
<EFBFBD>
<EFBFBD>
<EFBFBD>
<EFBFBD>
<12><18><1A><1A>B<EFBFBD><0F>%<25> <20><12> $<24> $<24><02> <0A>Irc <01>~<00>tj<00><00>}|j<00>|<00><00>}t |||<01><00>S)a<>Render a template by name with the given context as a stream.
This returns an iterator of strings, which can be used as a
streaming response from a view.
:param template_name_or_list: The name of the template to render. If
a list is given, the first name to exist will be rendered.
:param context: The variables to make available in the template.
.. versionadded:: 2.2
)r r`rarbrnrcs r<00>stream_templaterp<00>s:<00><00> <16>
)<29>
+<2B>
+<2B>C<EFBFBD><12>}<7D>3<>3<>4I<34>J<>J<>H<EFBFBD> <12>3<EFBFBD><08>'<27> *<2A> *<2A>*rc <01>~<00>tj<00><00>}|j<00>|<00><00>}t |||<01><00>S)aZRender a template from the given source string with the given
context as a stream. This returns an iterator of strings, which can
be used as a streaming response from a view.
:param source: The source code of the template to render.
:param context: The variables to make available in the template.
.. versionadded:: 2.2
)r r`rargrnrhs r<00>stream_template_stringrr<00>s9<00><00> <16>
)<29>
+<2B>
+<2B>C<EFBFBD><12>}<7D>(<28>(<28><16>0<>0<>H<EFBFBD> <12>3<EFBFBD><08>'<27> *<2A> *<2A>*r)rr)rrr3rrSrrr4)r]r^rSr!rr4)rer4rSr!rr4)rrr3rrSrrrj)r]r^rSr!rrj)rer4rSr!rrj)#<23>
__future__r<00>typing<6E>t<>jinja2rrr&rr<00>globalsr r
r r <00>helpersr <00>signalsrr<00> TYPE_CHECKINGrr<00>
sansio.appr<00>sansio.scaffoldrrr/r\rdrirnrprrr-rr<00><module>r}s<00><01>"<22>"<22>"<22>"<22>"<22>"<22><12><12><12><12><1D><1D><1D><1D><1D><1D>1<>1<>1<>1<>1<>1<><1B><1B><1B><1B><1B><1B>#<23>#<23>#<23>#<23>#<23>#<23><1C><1C><1C><1C><1C><1C> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20><1C><1C><1C><1C><1C><1C>(<28>(<28>(<28>(<28>(<28>(<28>+<2B>+<2B>+<2B>+<2B>+<2B>+<2B>&<26>&<26>&<26>&<26>&<26>&<26><04>?<3F>*<2A><1A><1A><1A><1A><1A><1A><1F><1F><1F><1F><1F><1F>)<29>)<29>)<29>)<29>)<29>)<29> <0E> <0E> <0E> <0E>
<17>
<17>
<17>
<17>
<17>/<2F>
<17>
<17>
<17>G<1C>G<1C>G<1C>G<1C>G<1C>Z<EFBFBD>G<1C>G<1C>G<1C>T <0E> <0E> <0E> <0E> +<2B> +<2B> +<2B> +<2B> +<2B> +<2B> +<2B> +<2B><0E><0E><0E><0E>.+<2B>+<2B>+<2B>+<2B>& +<2B> +<2B> +<2B> +<2B> +<2B> +r