Files
intellecton/venv/lib/python3.12/site-packages/jinja2/__pycache__/utils.cpython-312.pyc
T

325 lines
34 KiB
Plaintext
Raw Normal View History

Ë
LÀjA^ã
óL—UddlZddlZddlZddlZddlZddlmZddlmZddl m
Z
ddl m Z ddl m
Z
ddlmZddlmZddlZej&rddlZej,d ej.d
ej0f¬ «ZGd „d
«Ze«Zej0ed< e«Zej>eed<dj@Z!dedefd„Z"dedefd„Z#dedefd„Z$Gd„dejJ«Z&dedefd„Z'dej0de(fd„Z)dejTej0ddfd„Z+dFd„Z,dGde-de(dej0fd „Z.dHd!e-d"e-dej^ej`ej0fd#„Z1dej0de-fd$„Z2dej0de-fd%„Z3ejhd&ejjejlz«Z7ejhd'«Z8 dId(e-d)ej^e9d*ej^e-d+ej^e-d,ej^ejTe-de-f d-„Z: dJd.e9d/e(d0e9d1e9de-f
d2„Z;dKdej0d3e-d4e(de-fd5„Z<ejzj|Gd6„d7««Z? dLd8ej€e-d9ej€e-d:e(d;e(dej.ej^e-ge(ff
d<„ZA dMdej0d=ej^ej.d
e-fd>ej0dej„fd?„ZCGd@„dA«ZDGdB„dC«ZEGdD„dE«ZFy)NéN)Úabc)Údeque)Úchoice)Ú randrange)ÚLock)ÚCodeType)Úquote_from_bytesÚF.)Úboundcó$—eZdZdefd„Zdefd„Zy)Ú _MissingTypeÚreturncó—y©NÚmissing©©Úselfs úO/home/antigravity/intellecton/venv/lib/python3.12/site-packages/jinja2/utils.pyÚ__repr__z_MissingType.__repr__ó€Øócó—yrrrs rÚ
__reduce__z_MissingType.__reduce__rrN)Ú__name__Ú
__module__Ú __qualname__Ústrrrrrrr
r
s„ð˜#óð˜Côrr
rÚ
internal_codeÚÚfrcó0—tj|_|S)a·Pass the :class:`~jinja2.runtime.Context` as the first argument
to the decorated function when called while rendering a template.
Can be used on functions, filters, and tests.
If only ``Context.eval_context`` is needed, use
:func:`pass_eval_context`. If only ``Context.environment`` is
needed, use :func:`pass_environment`.
.. versionadded:: 3.0.0
Replaces ``contextfunction`` and ``contextfilter``.
)Ú_PassArgÚcontextÚjinja_pass_arg©r!s rÚ pass_contextr'&s€ô ×'Ñ'€AÔØ €Hrcó0—tj|_|S)a“Pass the :class:`~jinja2.nodes.EvalContext` as the first argument
to the decorated function when called while rendering a template.
See :ref:`eval-context`.
Can be used on functions, filters, and tests.
If only ``EvalContext.environment`` is needed, use
:func:`pass_environment`.
.. versionadded:: 3.0.0
Replaces ``evalcontextfunction`` and ``evalcontextfilter``.
)r#Ú eval_contextr%r&s rÚpass_eval_contextr*7s€ô ×,Ñ,€AÔØ €Hrcó0—tj|_|S)aPass the :class:`~jinja2.Environment` as the first argument to
the decorated function when called while rendering a template.
Can be used on functions, filters, and tests.
.. versionadded:: 3.0.0
Replaces ``environmentfunction`` and ``environmentfilter``.
)r#Ú environmentr%r&s rÚpass_environmentr-Hs€ô ×+Ñ+€AÔØ €Hrcó¦—eZdZej«Zej«Zej«Zede de
jdfd„«Z y)r#Úobjrcó4—t|d«r |jSy)Nr%)Úhasattrr%)Úclsr/s rÚfrom_objz_PassArg.from_objZs€ä �3Ð(Ô )Ø×%Ñ%Ð %àrN)
rrrÚenumÚautor$r)r,Ú classmethodr
ÚtÚOptionalr3rrrr#r#UsR„؈d�i‰i‹k€GØ�4—9‘9“;€LØ�$—)‘)“+€Kàð˜1ð §¡¨JÑ!7òóñrr#cóD—tj|j«|S)z%Marks the function as internally used)rÚaddÚ__code__r&s rÚ internalcoder<bs€ä×Ñ�a—j‘jÔ!Ø €Hrr/có&—ddlm}t||«S)a´Check if the object passed is undefined. This does nothing more than
performing an instance check against :class:`Undefined` but looks nicer.
This can be used for custom filters or tests that want to react to
undefined variables. For example a custom default filter can look like
this::
def default(var, default=''):
if is_undefined(var):
return default
return var
é)Ú Undefined)Úruntimer?Ú
isinstance)r/r?s rÚ is_undefinedrBhs€õ#ä �c˜9Ó %Ð%rÚiterablecó—|D]}Œy)z4Consumes an iterable without doing anything with it.Nr)rCÚ_s rÚconsumerFys€à
ò
ˆØ ñ
rcó\—ddlm}ddlm}|j «|j «y)a Jinja keeps internal caches for environments and lexers. These are
used so that Jinja doesn't have to recreate environments and lexers all
the time. Normally you don't have to care about that but if you are
measuring memory consumption you may want to clean the caches.
r>)Úget_spontaneous_environment)Ú _lexer_cacheN)r,rHÚlexerrIÚ cache_clearÚclear)rHrIs rÚ clear_cachesrMs"€õ 9Ý#à×+Ñ+Ô-Ø×ÑÕrÚ import_nameÚsilentcóä— d|vr|jdd«\}}n%d|vr|jd«\}}}n t|«Stt|dd|g«|«S#tt
f$r|s‚YywxYw)a˜Imports an object based on a string. This is useful if you want to
use import paths as endpoints or something similar. An import path can
be specified either in dotted notation (``xml.sax.saxutils.escape``)
or with a colon as object delimiter (``xml.sax.saxutils:escape``).
If the `silent` is True the return value will be `None` if the import
fails.
:return: imported object
ú:r>ú.N)ÚsplitÚ
rpartitionÚ
__import__ÚgetattrÚ ImportErrorÚAttributeError)rNrOÚmoduler/rEs rÚ
import_stringrZŒs‡€ð
Ø �+Ñ Ø%×+Ñ+¨C°Ó3‰KˆF‘CØ
�KÑ
Ø(×3Ñ3°CÓ8‰NˆF�A‘sä˜kÓ*Ð *Ü”z &¨$°°s°eÓ<¸cÓBÐBøÜ œÐ (òÙØ ñðús‚>AÁAÁA/Á.A/ÚfilenameÚmodecóZ—tjj|«syt||«S)z\Returns a file descriptor for the filename if that file exists,
otherwise ``None``.
N)ÚosÚpathÚisfileÚopen)r[r\s rÚopen_if_existsrb¤s$€ô �7‰7�>‰>˜(Ô #Øä �˜$Ó Ðrcó¤—|€y|turyt|«}|jdk(r|j›d�S|j›d|j›d�S)z¨Returns the name of the object's type. For some recognized
singletons the name of the object is returned instead. (For
example for `None` and `Ellipsis`).
ÚNoneÚEllipsisÚbuiltinsz objectrR)reÚtyperr)r/r2s rÚobject_type_reprrh®sX€ð
 €{ØØ ”‰Øä
ˆs‹)€Cà
‡~�~˜Ò#Ø—,‘,�˜wÐ'Ð'à�n‰nÐ
˜Q˜sŸ|™|˜n¨GÐ 4Ð4rcó—ddlm}||«S)z.Format an object using :func:`pprint.pformat`.r)Úpformat)Úpprintrj)r/rjs rrjrjÀs€åá �3‹<Ðra@
^
(
(https?://|www\.) # scheme or www
(([\w%-]+\.)+)? # subdomain
(
[a-z]{2,63} # basic tld
|
xn--[\w%]{2,59} # idna tld
)
|
([\w%-]{2,63}\.)+ # basic domain
(com|net|int|edu|gov|org|info|mil) # basic tld
|
(https?://) # scheme
(
(([\d]{1,3})(\.[\d]{1,3}){3}) # IPv4
|
(\[([\da-f]{0,4}:){2}([\da-f]{0,4}:?){1,6}]) # IPv6
)
)
(?::[\d]{1,5})? # port
(?:[/?#]\S*)? # path, query, and fragment
$
z^\S+@\w[\w.-]*\.\w+$ÚtextÚtrim_url_limitÚrelÚtargetÚ
extra_schemesc
󯇗‰�dtdtfˆfd„ }ndtdtfd„}tjdttj|«««}|rdtj|«›d�nd }|rd
tj|«›d�nd }t |«D�]0\} }
d |
d }
} } tj d | «}|r#|j«} | |j«d} | jd «r;tjd
| «}|r#|j«}
| d|j«} dD]~\}}| j|«}|| j|«krŒ,tt||
j|«««D],}|
j|«t!|«z}| |
d|z
} |
|d}
Œ.Œ€t"j
| «rL| j%d«s| j%d«rd| ›d|›|›d|| «›d�} nÃd| ›d|›|›d|| «›d�} n®| j%d«r%t&j
| dd«r
d| ›d| dd›d�} nxd| vrE| j%d«s4| j%d«s#d| vrt&j
| «r
d| ›d| ›d�} n/|�-|D](}| |k7sŒ | j%|«sŒd| ›d|›|›d| ›d�} Œ*| ›| ›|
›�|| <�Œ3d j)|«S)a;Convert URLs in text into clickable links.
This may not recognize links in some situations. Usually, a more
comprehensive formatter, such as a Markdown library, is a better
choice.
Works on ``http://``, ``https://``, ``www.``, ``mailto:``, and email
addresses. Links with trailing punctuation (periods, commas, closing
parentheses) and leading punctuation (opening parentheses) are
recognized excluding the punctuation. Email addresses that include
header fields are not recognized (for example,
``mailto:address@example.com?cc=copy@example.com``).
:param text: Original text containing URLs to link.
:param trim_url_limit: Shorten displayed URL values to this length.
:param target: Add the ``target`` attribute to links.
:param rel: Add the ``rel`` attribute to links.
:param extra_schemes: Recognize URLs that start with these schemes
in addition to the default behavior.
.. versionchanged:: 3.0
The ``extra_schemes`` parameter was added.
.. versionchanged:: 3.0
Generate ``https://`` links for URLs without a scheme.
.. versionchanged:: 3.0
The parsing rules were updated. Recognize email addresses with
or without the ``mailto:`` scheme. Validate IP addresses. Ignore
parentheses and brackets in more cases.
NÚxrcó4•—t|«‰kDr|d‰›d�S|S)Nz...)Úlen)rrrms €rÚtrim_urlzurlize.<locals>.trim_urls)ø€Ü�1‹v˜Ò&ؘO˜^Ð,Ð-¨SÐ1Ð1àˆHrcó—|S©Nr)rrs rruzurlize.<locals>.trim_urls€ØˆHrz(\s+)z rel="ú"r z target="z
^([(<]|&lt;)+)ú)ú>rRú,ú
ú&gt;z([)>.,\n]|&gt;)+$))ú(ry)ú<rz)z&lt;r}zhttps://zhttp://z <a href="rzz</a>z<a href="https://zmailto:éz">ú@zwww.rQz<a href="mailto:)rÚrerSÚ
markupsafeÚescapeÚ enumerateÚmatchÚgroupÚendÚendswithÚsearchÚstartÚcountÚrangeÚminÚindexrtÚ_http_reÚ
startswithÚ _email_reÚjoin)rlrmrnrorpruÚwordsÚrel_attrÚ target_attrÚiÚwordÚheadÚmiddleÚtailr†Ú
start_charÚend_charÚ start_countrEÚ end_indexÚschemes ` rÚurlizer¡æs3ø€ðLÐ!ð œð ¤ö ð œð ¤ó ô
�H‰H�Xœs¤:×#4Ñ#4°TÓ#:Ó;Ó <€EÙ58�œ
×)Ñ)¨#Ó.Ð/¨qÑ1¸b€HÙ>D�Iœj×/Ñ/°Ó7Ð8¸Ñ:È"€Kä˜UÓ#ó?+‰ˆˆ4Ø  r�dˆfˆÜ—‘Ð)¨6Ó2ˆá Ø—;‘;“=ˆDؘEŸI™I›K˜MÐ*ˆFð
�?‰?Ð=Ô >Ü—I‘IÐ2°FÓ;ˆEáØ—{‘{“}�Ø  %§+¡+£-Ð0�ð%Mò (Ñ ˆJ˜Ø Ÿ,™, zÓ2ˆKà˜fŸl™l¨8Ó4Ò4àôœ3˜{¨D¯J©J°xÓ,@ÓAÓBò
(�Ø ŸJ™J xÓ0´3°x³=Ñ@� à˜$˜z  Ð*Ñ*�ؘI˜JÐ'‘ñ 
(ð (ô �>‰>˜&Ô !Ø× Ñ  Ô,°×0AÑ0AÀ)Ô0Là ˜x q¨¨
°;°-¸qÁÈ&ÓAQÐ@RÐRVÐWñð
(¨ x¨q°°
¸;¸-ÀqÙ Ó'Ð(¨ð.ñð
×
Ñ
˜yÔ
)¬i¯o©o¸fÀQÀR¸jÔ.IØ   ¨¨6°!°"¨:¨,°dÐ;‰Fð
�6‰MØ×%Ñ% fÔ-à×%Ñ% cÔ*ؘ6Ñ!Ü—‘ Ô'à'¨ x¨r°&°¸Ð>‰Fà
Ð
&Ø'ò
W�ؘVÓ#¨×(9Ñ(9¸&Õ(AØ(¨¨°°(°¸K¸=ÈÈ&ÈÐQUÐV‘Fð
Wð�V˜F˜8 D 6Ð*ˆˆa‹ð?+ðB �7‰7�5‹>ÐrÚnÚhtmlrŽÚmaxc óÀ—ddlm}|j«}g}t|«D]û}d}dx} }
d} d} g}
t tt ||«««D]z\}} t
|«} | | k7r| } nŒ|r| j«} d}|t dd«z
| kDr |} |
d z
}
| d
z
} |t d d «z
|
kDr |x} }
| d
z
} d}|
j| «Œ|dj|
«}|jd
«r |ddd
z}n|jd
«s|d
z
}|j|«Œý|sdj|«Stjdjd„|D«««S)z+Generate some lorem ipsum for the template.r>)ÚLOREM_IPSUM_WORDSTrNFééér{é
érRú éÿÿÿÿz
r|c3óNK—|]}dtj|«›d�–—Œy­w)z<p>z</p>N)rƒr„©Ú.0rrs rú <genexpr>z'generate_lorem_ipsum.<locals>.<genexpr>”s%èø€ÒC°q�Cœ
×)Ñ)¨!Ó,Ð-¨TÔ2ÑCùs‚#%)
Ú constantsr¦rSr�r…rrÚ
capitalizeÚappendr“r‰rƒÚMarkup)r¢r£rŽr¤r¦r”ÚresultrEÚnext_capitalizedÚ
last_commaÚ
last_fullstopr˜ÚlastÚpÚidxÚp_strs rÚgenerate_lorem_ipsumr¾as“€õ-à × #Ñ #Ó %€EØ
€Fä
�1‹Xò%ˆØÐØ%&Ð&ˆ
�]ØˆØˆØ ˆô ¤¤i°°SÓ&9Ó :Ó;ò ‰FˆC�ØÜ˜e“}�ؘ4’<Ø�DØð ñ
 Ø—‘Ó(�Ø#(Ð à”Y˜q !“_Ñ$ zÒ1Ø �
Ø Ñ"�
ؘ‘ �à”Y˜r 2Ó&Ñ&¨Ò6Ø-0Ð0�
˜]ؘ‘ �Ø#'Ð Ø
�H‰H�T�Nð' ð,—‘˜“ ˆà �>‰>˜#Ô Ø˜#˜2�J Ñ$‰EØ—‘ Ô$Ø �S‰LˆEà�
‰
�eÕðK%ñN Ø�{‰{˜6Ó"Ð"Ü × Ñ Ø � ‰ ÑC¸FÔCÓCó ðrÚcharsetÚfor_qscóÊ—t|t«s,t|t«s t|«}|j|«}|rdnd}t ||«}|r|j dd«}|S)a5Quote a string for use in a URL using the given charset.
:param obj: String or bytes to quote. Other types are converted to
string then encoded to bytes using the given charset.
:param charset: Encode text to bytes using this charset.
:param for_qs: Quote "/" and use "+" for spaces.
ró/z%20ú+)rAÚbytesrÚencoder Úreplace)r/r¿rÀÚsafeÚrvs rÚ url_quoterɘs\€ô �cœ5Ô !ܘ#œsÔ#Ü�c“(ˆCà�j‰j˜Ó!ˆá‰3˜d€DÜ ˜#˜tÓ $€Bá
Ø
�Z‰Z˜˜sÓ
#ˆà
€IrcóÆ—eZdZdZdeddfd„Zdd„Zdeje ejffd„Z deje ejfddfd „Z dejejd
ffd „Zdd „Zd d
ejdejdejfd„Zd d
ejdejdejfd„Zdd„Zd
ejdefd„Zdefd„Zde fd„Zd
ejdejfd„Zd
ejdejddfd„Zd
ejddfd„Zdej4ejejejffd„Zdej4ejfd„Zdej4ejfd„Zdej<ejfd„Zdej<ejfd„Z eZ!y)!ÚLRUCachez"A simple LRU Cache implementation.ÚcapacityrNcó^—||_i|_t«|_|j «yrw)rÌÚ_mappingrÚ_queueÚ _postinit)rrÌs rÚ__init__zLRUCache.__init__·s#€Ø ˆŒ
Ø.0ˆŒ
Ü',£wˆŒ Ø �‰Õrcóú—|jj|_|jj|_|jj
|_t«|_|jj|_
yrw) rÏÚpopleftÚ_popleftÚpopÚ_popÚremoveÚ_removerÚ_wlockr´Ú_appendrs rrÐzLRUCache._postinit½sM€àŸ ™ ×+Ñ+ˆŒ
Ø—K‘K—O‘OˆŒ Ø—{‘{×)Ñ)ˆŒ Ü“fˆŒ Ø—{‘{×)Ñ)ˆ� rcóJ—|j|j|jdœS)N©rÌrÎrÏrÜrs rÚ __getstate__zLRUCache.__getstate__Ås!€àŸ
™
ØŸ
™
Ø—k‘kñ
ð
rÚdcóZ—|jj|«|j«yrw)Ú__dict__ÚupdaterÐ)rrÞs rÚ __setstate__zLRUCache.__setstate__Ìs€Ø �
‰
×јQÔØ �‰Õr.có—|jfSrw)rÌrs rÚ__getnewargs__zLRUCache.__getnewargs__Ðs€Ø—
‘
ÐÐrcóЗ|j|j«}|jj|j«|jj |j«|S)z&Return a shallow copy of the instance.)Ú __class__rÌrÎrárÏÚextend©rrÈs rÚcopyz
LRUCache.copyÓsE€à
�^‰^˜DŸM™MÓ
*ˆØ
� ‰ ×ј4Ÿ=™=Ô)Ø
� ‰ ×јŸ™Ô%؈ rÚkeyÚdefaultcó0— ||S#t$r|cYSwxYw)z/Return an item from the cache dict or `default`©ÚKeyError©rrêrës rÚgetz LRUCache.getÚs%€ð ؘ‘9Ð øÜò ØŠNð ús ‚‡ ”có:— ||S#t$r
|||<|cYSwxYw)zvSet `default` if the key is not in the cache otherwise
leave unchanged. Return the value of this key.
rírïs rÚ
setdefaultzLRUCache.setdefaultás.€ð ؘ‘9Ð øÜò ؈D�‰IØŠNð ús ‚‡™có®—|j5|jj«|jj«ddd«y#1swYyxYw)zClear the cache.N)rÙrÎrLrÏrs rrLzLRUCache.clearës>€à
�[‰[ñ Ø �M‰M× Ñ Ô !Ø �K‰K× Ñ Ô ÷ ÷ ñ ús �5A Á Acó—||jvS)z$Check if a key exists in this cache.)rΩrrês rÚ __contains__zLRUCache.__contains__ñs€à�d—m‘mÐ#Ð#rcó,—t|j«S)z%Return the current size of the cache.)rtrÎrs rÚ__len__zLRUCache.__len__õs€ä�4—=‘=Ó!Ð!rcóN—dt|«j›d|j›d�S)Nrr¬rz)rgrrÎrs rrzLRUCache.__repr__ùs'€Ø”4˜“:×&Ñ&Ð' q¨¯©Ð(9¸Ð;Ð;rcóð—|j5|j|}|jd|k7r# |j|«|j |«|cddd«S#t$rYŒ'wxYw#1swYyxYw)zšGet an item from the cache. Moves the item up so that it has the
highest priority then.
Raise a `KeyError` if it does not exist.
r­N)rÙrÎrÏrØÚ
ValueErrorrÚ)rrêrÈs rÚ __getitem__zLRUCache.__getitem__üs{€ð �[‰[ñ Ø—‘˜sÑ#ˆBà�{‰{˜2‰ #Ò%ðØ—L‘L Ô%ð— ‘ ˜SÔ!à÷ ñ øô "òñð ú÷
 ð ús.�"A,°AÁA,Á A)Á&A,Á(A)Á)A,Á,A5Úvaluecó@—|j5||jvr|j|«n=t|j«|jk(r|j|j «=|j
|«||j|<ddd«y#1swYyxYw)zhSets the value for an item. Moves the item up so that it
has the highest priority then.
N)rÙrÎrØrtrÌrÔrÚ)rrêrýs rÚ __setitem__zLRUCache.__setitem__sy€ð�[‰[ñ 'Ø�d—m‘mÑ#Ø— ‘ ˜SÕ!Ü�T—]‘]Ó# t§}¡}Ò4Ø—M‘M $§-¡-£/Ð2à �L‰L˜Ô Ø!&ˆD�M‰M˜#Ñ ÷ '÷ 'ñ 'ús �A>BÂBcó¢—|j5|j|= |j|«ddd«y#t$rYŒwxYw#1swYyxYw)z]Remove an item from the cache dict.
Raise a `KeyError` if it does not exist.
N)rÙrÎrØrûrõs rÚ __delitem__zLRUCache.__delitem__sV€ð�[‰[ñ Ø—
‘
˜cÐ"ð
Ø— ‘ ˜SÔ!÷  ð øô
ò
Ùð
ú÷  ð ús%�Aœ6¶ A¿AÁAÁAÁAcó’—t|j«D�cgc]}||j|f‘Œ}}|j«|Scc}w)zReturn a list of items.)ÚlistrÏrÎÚreverse)rrêr¶s rÚitemszLRUCache.items+sA€ä7;¸D¿K¹KÓ7HÖI°�3˜Ÿ
™
 cÑ*Ò+ÐIˆÐIØ�‰Ô؈
ùòJs˜AcóN—|j«D�cgc]}|d‘Œ c}Scc}w)zReturn a list of all values.r>)r)rrrs rÚvalueszLRUCache.values1s €à"Ÿj™j›lÖ+˜��!“Ò+Ð+ùÒ+s“ "có—t|«S)z7Return a list of all keys ordered by most recent usage.)rrs rÚkeysz
LRUCache.keys5s €ä�D‹zÐrcó>—tt|j««Srw)ÚreversedÚtuplerÏrs rÚ__iter__zLRUCache.__iter__9s€Üœ˜dŸk™kÓ*Ó+Ð+rcó>—tt|j««S)zTIterate over the keys in the cache dict, oldest items
coming first.
)Úiterr rÏrs rÚ __reversed__zLRUCache.__reversed__<s€ô”E˜$Ÿ+™+Ó&Ó'Ð'r©rN)rzte.Selfrw)"rrrÚ__doc__ÚintrÑrÐr7ÚMappingrÚAnyrÝrâÚTuplerärérðròrLÚboolrörørrürÿrÚIterablerrr ÚIteratorr
rÚ__copy__rrrrËr˯sé„á,ð  ð¨óó *ð
˜aŸi™i¨¨Q¯U©U¨
Ñ3ó
ð˜aŸi™i¨¨Q¯U©U¨
Ñ3ð¸óð  §¡¨¯©¨s¨
Ñ 3ó óñ�q—u‘uð q§u¡u𸿹óñ˜aŸe™eð¨a¯e©eð¸q¿u¹uóó ð $ §¡ð$¨$ó$ð"˜ó"ð<˜#ó<ð˜qŸu™u𨯩óð, '˜qŸu™uð '¨Q¯U©Uð '°tó 'ð
˜qŸu™uð
¨ó
ð�q—z‘z !§'¡'¨!¯%©%°·±¨,Ñ"7Ñ8óð ,˜Ÿ
™
 1§5¡5Ñ)ó,ð�a—j‘j §¡Ñ'óð,˜!Ÿ*™* Q§U¡UÑ+ó,ð(˜aŸj™j¨¯©Ñ/ó(ð �HrrËÚenabled_extensionsÚdisabled_extensionsÚdefault_for_stringrëc󢇇‡‡—td„|D««Štd„|D««Šdtjtdtfˆˆˆˆfd„ }|S)acIntelligently sets the initial value of autoescaping based on the
filename of the template. This is the recommended way to configure
autoescaping if you do not want to write a custom function yourself.
If you want to enable it for all templates created from strings or
for all templates with `.html` and `.xml` extensions::
from jinja2 import Environment, select_autoescape
env = Environment(autoescape=select_autoescape(
enabled_extensions=('html', 'xml'),
default_for_string=True,
))
Example configuration to turn it on at all times except if the template
ends with `.txt`::
from jinja2 import Environment, select_autoescape
env = Environment(autoescape=select_autoescape(
disabled_extensions=('txt',),
default_for_string=True,
default=True,
))