Files
pyGoEdge-UserPanel/.venv/Lib/site-packages/django/template/__pycache__/context.cpython-312.pyc

75 lines
14 KiB
Plaintext
Raw Normal View History

2025-11-18 03:36:49 +08:00
<EFBFBD>
j<> i<>$<00><00><><00>ddlmZddlmZdZGd<04>de<04>ZGd<06>de<06>ZGd<08>d <09>ZGd
<EFBFBD>d e<08>Z Gd <0C>d e<08>Z
Gd<0E>de <09>Z dd<11>Z y)<13>)<01>contextmanager)<01>copy)z'django.template.context_processors.csrfc<00><00>eZdZdZy)<03>ContextPopExceptionz,pop() has been called more times than push()N)<04>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__<5F><00><00>FE:\Project\pygoedge\.venv\Lib\site-packages\django/template/context.pyrrs<00><00>2<>r rc<00>*<00><00>eZdZ<02>fd<01>Zd<02>Zd<03>Z<05>xZS)<04> ContextDictc<00>h<00><01>t<00>|<00>|i|<03><01>|jj|<00>||_y<00>N)<05>super<65>__init__<5F>dicts<74>append<6E>context)<05>selfr<00>args<67>kwargs<67> __class__s <20>r rzContextDict.__init__s.<00><><00> <0A><07><18>$<24>)<29>&<26>)<29><0F> <0A> <0A><1C><1C>T<EFBFBD>"<22><1E><04> r c<00><00>|Srr <00>rs r <00> __enter__zContextDict.__enter__s<00><00><13> r c<00>8<00>|jj<00>yr)r<00>pop)rrrs r <00>__exit__zContextDict.__exit__s<00><00> <0C> <0C> <0C><18><18>r )rrr rrr <00> __classcell__<5F>rs@r rrs<00><><00><1F> <14>r rc<00>|<00>eZdZdd<02>Zdd<03>Zd<04>Zd<05>Zd<06>Zd<07>Zd<08>Z d <09>Z
d
<EFBFBD>Z d <0B>Z d <0C>Z d <0A>Zdd<0E>Zdd<0F>Zdd<10>Zd<11>Zd<12>Zy)<14> BaseContextNc<00>&<00>|j|<01>yr)<01> _reset_dicts)r<00>dict_s r rzBaseContext.__init__s<00><00> <0C><19><19>%<25> r c<00><><00>dddd<03>}|g|_t|t<00>r#|xj|jddz c_y|<01>|jj|<01>yy)NTF)<03>True<75>False<73>None<6E>)r<00>
isinstancer$r)r<00>value<75>builtinss r r&zBaseContext._reset_dicts sV<00><00> <20>5<EFBFBD>$<24>?<3F><08><1E>Z<EFBFBD><04>
<EFBFBD> <15>e<EFBFBD>[<5B> )<29> <10>J<EFBFBD>J<EFBFBD>%<25>+<2B>+<2B>a<EFBFBD>b<EFBFBD>/<2F> )<29>J<EFBFBD> <12> <1E> <10>J<EFBFBD>J<EFBFBD> <1D> <1D>e<EFBFBD> $<24>r c<00><><00>t<00>}|j|_t|j<00>|_|jdd|_|Sr)r$rr<00>__dict__r)r<00> duplicates r <00>__copy__zBaseContext.__copy__(s;<00><00><1F>M<EFBFBD> <09>"<22>n<EFBFBD>n<EFBFBD> <09><1B>!<21>$<24>-<2D>-<2D>0<> <09><1A><1E>*<2A>*<2A>Q<EFBFBD>-<2D> <09><0F><18>r c<00>,<00>t|j<00>Sr)<02>reprrrs r <00>__repr__zBaseContext.__repr__/s<00><00><13>D<EFBFBD>J<EFBFBD>J<EFBFBD><1F>r c<00>,<00>t|j<00>Sr<00><02>reversedrrs r <00>__iter__zBaseContext.__iter__2s<00><00><17><04>
<EFBFBD>
<EFBFBD>#<23>#r c<00><><00>g}|D]6}t|t<00>r||jddz }<03>&|j|<04><00>8t |g|<03><01>i|<02><01>S<00>Nr,)r-r$rrr)rrrr<00>ds r <00>pushzBaseContext.push5sQ<00><00><12><05><15>A<EFBFBD><19>!<21>[<5B>)<29><15><11><17><17><11><12><1B>$<24><05><15> <0C> <0C>Q<EFBFBD><0F> <16>
<1B>4<EFBFBD>2<>%<25>2<>6<EFBFBD>2<>2r c<00>r<00>t|j<00>dk(rt<00>|jj<00>Sr<)<04>lenrrrrs r rzBaseContext.pop>s)<00><00> <0E>t<EFBFBD>z<EFBFBD>z<EFBFBD>?<3F>a<EFBFBD> <1F>%<25> %<25><13>z<EFBFBD>z<EFBFBD>~<7E>~<7E><1F>r c<00>(<00>||jd|<y)z%Set a variable in the current context<78><74><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD>r)r<00>keyr.s r <00> __setitem__zBaseContext.__setitem__Cs<00><00>#<23><04>
<EFBFBD>
<EFBFBD>2<EFBFBD><0E>s<EFBFBD>r c<00>p<00>|jd}t|j<00>D]
}||vs<01>|}n|||<y)z|
Set a variable in one of the higher contexts if it exists there,
otherwise in the current context.
rBN)rr9)rrDr.rr=s r <00>
set_upwardzBaseContext.set_upwardGs><00><00>
<17>*<2A>*<2A>R<EFBFBD>.<2E><07><19>$<24>*<2A>*<2A>%<25>A<EFBFBD><12>a<EFBFBD>x<EFBFBD><1B><07><15>&<26><1D><07><03> r c<00>b<00>t|j<00>D] }||vs<01>||cSt|<01><00>)zHGet a variable's value, starting at the current context and going upward)r9r<00>KeyError)rrDr=s r <00> __getitem__zBaseContext.__getitem__Ss1<00><00><19>$<24>*<2A>*<2A>%<25>A<EFBFBD><12>a<EFBFBD>x<EFBFBD><18><13>v<EFBFBD> <0A>&<26><17>s<EFBFBD>m<EFBFBD>r c<00>$<00>|jd|=y)z*Delete a variable from the current contextrBNrC<00>rrDs r <00> __delitem__zBaseContext.__delitem__Zs<00><00> <10>J<EFBFBD>J<EFBFBD>r<EFBFBD>N<EFBFBD>3<EFBFBD> r c<00>@<00><01>t<00>fd<01>|jD<00><00>S)Nc3<00>&<00>K<00>|]}<01>|v<00><01><00>
y<00>wrr )<03>.0r=rDs <20>r <00> <genexpr>z+BaseContext.__contains__.<locals>.<genexpr>_s<00><><00><><00>0<>Z<EFBFBD><01>3<EFBFBD>!<21>8<EFBFBD>Z<EFBFBD>s<00>)<02>anyrrLs `r <00> __contains__zBaseContext.__contains__^s<00><><00><12>0<>T<EFBFBD>Z<EFBFBD>Z<EFBFBD>0<>0<>0r c<00>P<00>t|j<00>D] }||vs<01>||cS|Srr8)rrD<00> otherwiser=s r <00>getzBaseContext.getas-<00><00><19>$<24>*<2A>*<2A>%<25>A<EFBFBD><12>a<EFBFBD>x<EFBFBD><18><13>v<EFBFBD> <0A>&<26><19>r c<00>8<00> ||S#t$r |||<Y|SwxYwr)rI)rrD<00>defaults r <00>
setdefaultzBaseContext.setdefaultgs.<00><00> <20><17><03>9<EFBFBD> <1C><><17> <20><1F>D<EFBFBD><13>I<EFBFBD><16><0E> <20>s <00><00><03>c<00>><00>t|<00>}|j|<01>|S)z{
Return a new context with the same properties, but with only the
values given in 'values' stored.
)rr&)r<00>values<65> new_contexts r <00>newzBaseContext.newns!<00><00>
<1B>4<EFBFBD>j<EFBFBD> <0B><13> <20> <20><16>(<28><1A>r c<00>N<00>i}|jD]}|j|<02><00>|S)z6
Return self.dicts as one dictionary.
)r<00>update)r<00>flatr=s r <00>flattenzBaseContext.flattenws'<00><00><12><04><15><1A><1A>A<EFBFBD> <10>K<EFBFBD>K<EFBFBD><01>N<EFBFBD><1C><13> r c<00>p<00>t|t<00>stS|j<00>|j<00>k(S)zN
Compare two contexts by comparing theirs 'dicts' attributes.
)r-r$<00>NotImplementedra)r<00>others r <00>__eq__zBaseContext.__eq__<5F>s+<00><00><1A>%<25><1B>-<2D>!<21> !<21><13>|<7C>|<7C>~<7E><15><1D><1D><1F>0<>0r r)rrr rr&r3r6r:r>rrErGrJrMrSrVrYr]rarer r r r$r$sW<00><00>!<21>%<25><19> <20>$<24>3<> <20>
$<24>
<1D><1C> <20>1<><19> <17><1B><14>1r r$c<00>D<00><00>eZdZdZd<06>fd<02> Zed<03><00>Z<06>fd<04>Zd<05>Z<08>xZ S)<07>Contextz&A stack container for variable contextc<00><><00><01>||_||_||_d|_t <00>|_d|_t<00>|<00>!|<01>y)N<>unknown) <09>
autoescape<EFBFBD>use_l10n<30>use_tz<74> template_name<6D> RenderContext<78>render_context<78>templaterr)rr'rjrkrlrs <20>r rzContext.__init__<5F>s@<00><><00>$<24><04><0F> <20><04> <0A><1C><04> <0B>&<26><04><1A>+<2B>o<EFBFBD><04><1B><1D><04> <0A> <0A><07><18><15>r c#<00>xK<00>|j<00> td<01><00>||_ d<00><02>d|_y#d|_wxYw<01>w)N<>&Context is already bound to a template)rp<00> RuntimeError)rrps r <00> bind_templatezContext.bind_template<74>s9<00><00><><00> <0F>=<3D>=<3D> $<24><1E>G<>H<> H<> <20><04> <0A> !<21> <11> <20>D<EFBFBD>M<EFBFBD><4D>D<EFBFBD>D<EFBFBD>M<EFBFBD>s<00>:<01>.<00>:<01> 7<03>:c<00>X<00><01>t<00>|<00><00>}t|j<00>|_|Sr)rr3rro)rr2rs <20>r r3zContext.__copy__<5F>s)<00><><00><19>G<EFBFBD>$<24>&<26> <09>#'<27><04>(;<3B>(;<3B>#<<3C> <09> <20><18>r c<00><><00>t|d<01>s td<02><00>t|t<00>r|jddj <00>}t ||<01>S)z;Push other_dict to the stack of dictionaries in the ContextrJz6other_dict must be a mapping (dictionary-like) object.r,N)<07>hasattr<74> TypeErrorr-r$rrr)r<00>
other_dicts r r_zContext.update<74>sJ<00><00><16>z<EFBFBD>=<3D>1<><1B>T<>U<> U<> <15>j<EFBFBD>+<2B> .<2E>#<23>)<29>)<29>!<21>"<22>-<2D>1<>1<>3<>J<EFBFBD><1A>4<EFBFBD><1A>,<2C>,r )NTNN)
rrr r
rrrtr3r_r!r"s@r rgrg<00>s)<00><><00>,<2C>  <20><14>!<21><14>!<21><19>
-r rgc<00>@<00>eZdZdZdZd<03>Zd<04>Zdd<05>Zd<06>Ze d d<07><01>Z
y)
rna<>
A stack container for storing Template state.
RenderContext simplifies the implementation of template Nodes by providing a
safe place to store state between invocations of a node's `render` method.
The RenderContext also provides scoping rules that are more sensible for
'template local' variables. The render context stack is pushed before each
template is rendered, creating a fresh scope with nothing in it. Name
resolution fails if a variable is not found at the top of the RequestContext
stack. Thus, variables are local to a specific template and don't affect the
rendering of other templates as they would if they were stored in the normal
template context.
Nc#<00>>K<00>|jdEd{<00><02><02>y7<00><05>w<01>NrBrCrs r r:zRenderContext.__iter__<5F>s<00><00><><00><17>:<3A>:<3A>b<EFBFBD>><3E>!<21>!<21>s <00><01><04>c<00>$<00>||jdvSr|rCrLs r rSzRenderContext.__contains__<5F>s<00><00><12>d<EFBFBD>j<EFBFBD>j<EFBFBD><12>n<EFBFBD>$<24>$r c<00>@<00>|jdj||<02>Sr|)rrV)rrDrUs r rVzRenderContext.get<65>s<00><00><13>z<EFBFBD>z<EFBFBD>"<22>~<7E>!<21>!<21>#<23>y<EFBFBD>1<>1r c<00>&<00>|jd|Sr|rCrLs r rJzRenderContext.__getitem__<5F>s<00><00><13>z<EFBFBD>z<EFBFBD>"<22>~<7E>c<EFBFBD>"<22>"r c#<00><>K<00>|j}||_|r|j<00> d<00><02>||_|r|j<00>yy#||_|r|j<00>wwxYw<01>wr)rpr>r)rrp<00>isolated_context<78>initials r <00>
push_statezRenderContext.push_state<74>s]<00><00><><00><16>-<2D>-<2D><07> <20><04> <0A> <1B> <10>I<EFBFBD>I<EFBFBD>K<EFBFBD> <1B> <11>#<23>D<EFBFBD>M<EFBFBD><1F><14><08><08>
<EFBFBD> <20><>$<24>D<EFBFBD>M<EFBFBD><1F><14><08><08>
<EFBFBD> <20>s<00>&A'<01>A<00>A'<01>A$<03>$A'r)T) rrr r
rpr:rSrVrJrr<>r r r rnrn<00>s6<00><00> <08><14>H<EFBFBD>"<22>%<25>2<>#<23><14>
<1B><14>
r rnc<00>J<00><00>eZdZdZ d<05>fd<02> Zed<03><00>Zd<06>fd<04> Z<07>xZS)<07>RequestContextz<74>
This subclass of template.Context automatically populates itself using
the processors defined in the engine's configuration.
Additional processors can be specified as a list of callables
using the "processors" keyword argument.
c<00><><00><01>t<00>|<00>||||<06><01>||_|<03>dn
t|<03>|_t |j <00>|_|ji<00>|ji<00>y)N)rkrlrjr ) rr<00>request<73>tuple<6C> _processorsr@r<00>_processors_indexr_)rr<>r'<00>
processorsrkrlrjrs <20>r rzRequestContext.__init__<5F>s`<00><><00> <0E><07><18><15><18>&<26>Z<EFBFBD><18>X<><1E><04> <0C>!+<2B>!3<>2<EFBFBD><15>z<EFBFBD>9J<39><04><18>!$<24>T<EFBFBD>Z<EFBFBD>Z<EFBFBD><1F><04><1E> <0A> <0B> <0B>B<EFBFBD><0F> <0A> <0B> <0B>B<EFBFBD>r c#<00>K<00>|j<00> td<01><00>||_|jj|jz}i}|D]&}||j
<00>} |j |<05><00>(||j|j< d<00><02>d|_i|j|j<y#t$r}td|j<00>d<03><03>|<06>d}~wwxYw#d|_i|j|j<wxYw<01>w)NrrzContext processor z didn't return a dictionary.) rprs<00>engine<6E>template_context_processorsr<73>r<>r_rxr rr<>)rrpr<><00>updates<65> processorr<00>es r rtzRequestContext.bind_template<74>s<><00><00><><00> <0F>=<3D>=<3D> $<24><1E>G<>H<> H<> <20><04> <0A><1D>_<EFBFBD>_<EFBFBD>@<40>@<40>4<EFBFBD>CS<43>CS<43>S<>
<EFBFBD><14><07>#<23>I<EFBFBD><1F><04> <0C> <0C>-<2D>G<EFBFBD> <19><17><0E><0E>w<EFBFBD>'<27>$<24>.5<EFBFBD><04>
<EFBFBD>
<EFBFBD>4<EFBFBD>)<29>)<29>*<2A> 4<> <11> <20>D<EFBFBD>M<EFBFBD>13<31>D<EFBFBD>J<EFBFBD>J<EFBFBD>t<EFBFBD>-<2D>-<2D> .<2E><><1D> <19><1F>(<28><19>)?<3F>)?<3F>(@<40>A"<22>"<22><12><19><19><> <19><>!<21>D<EFBFBD>M<EFBFBD>13<31>D<EFBFBD>J<EFBFBD>J<EFBFBD>t<EFBFBD>-<2D>-<2D> .<2E>sB<00>AD<01>B0<02>/D<01> C<00>!D<01>0 C<05>9C<05>C<05>D<01>"C=<03>=Dc<00>B<00><01>t<00>|<00>|<01>}t|d<01>r|`|S)Nr<4E>)rr]rwr<>)rr[r\rs <20>r r]zRequestContext.news*<00><><00><1B>g<EFBFBD>k<EFBFBD>&<26>)<29> <0B> <13>;<3B> 3<> 4<><1B>-<2D><1A>r )NNNNTr) rrr r
rrrtr]r!r"s@r r<>r<><00>s<<00><><00><08><13><17><15><13><17><18>*<14>4<><14>4<>6<1B>r r<>Nc <00><><00>|<00>2t|t<00>s"td|jjz<00><00>|<01>t |fi|<02><01>}|S|}t |fi|<02><01>}|r|j|<03>|S)zT
Create a suitable Context from a plain dict and optionally an HttpRequest.
z&context must be a dict rather than %s.)r-<00>dictrxrrrgr<>r>)rr<>r<00>original_contexts r <00> make_contextr<74>s}<00><00><0F><1A>:<3A>g<EFBFBD>t<EFBFBD>#<<3C><17> 4<>w<EFBFBD>7H<37>7H<37>7Q<37>7Q<37> Q<>
<EFBFBD>
<EFBFBD><0F><EFBFBD><19>'<27>,<2C>V<EFBFBD>,<2C><07> <13>N<EFBFBD> #<23><18> <20><17>3<>F<EFBFBD>3<><07> <1B> <13>L<EFBFBD>L<EFBFBD>)<29> *<2A> <12>Nr r) <0A>
contextlibrr<00>_builtin_context_processors<72> Exceptionrr<>rr$rgrnr<>r<>r r r <00><module>r<>se<00><01>%<25><15>K<01><1B> <09>)<29> <09> <1B>$<24> <1B>k1<>k1<>\#-<2D>k<EFBFBD>#-<2D>L)<1B>K<EFBFBD>)<1B>X?<1B>W<EFBFBD>?<1B>Dr