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 :  /usr/lib64/python2.7/site-packages/django/core/serializers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/django/core/serializers/__init__.pyc
�
r�\c@s�dZddlmZddlmZddlmZddlmZidd6dd	6d
d6dd
6Zia	de
fd��YZdd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS(s�
Interfaces for serializing Django objects.

Usage::

    from django.core import serializers
    json = serializers.serialize("json", some_queryset)
    objects = list(serializers.deserialize("json", json))

To add your own serializers, use the SERIALIZATION_MODULES setting::

    SERIALIZATION_MODULES = {
        "csv" : "path.to.csv.serializer",
        "txt" : "path.to.txt.serializer",
    }

i����(tsettings(t	importlib(tsix(tSerializerDoesNotExists&django.core.serializers.xml_serializertxmlsdjango.core.serializers.pythontpythonsdjango.core.serializers.jsontjsonsdjango.core.serializers.pyyamltyamlt
BadSerializercBs&eZdZeZd�Zd�ZRS(s&
    Stub serializer to hold exception raised during registration

    This allows the serializer registration to cache serializers and if there
    is an error raised in the process of creating a serializer it will be
    raised and passed along to the caller when the serializer is used.
    cCs
||_dS(N(t	exception(tselfR	((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pyt__init__-scOs
|j�dS(N(R	(R
targstkwargs((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pyt__call__0s(t__name__t
__module__t__doc__tFalsetinternal_use_onlyRR(((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pyR#s	cCs�|dkrtrt�nytj|�}WnBtk
rt}t|�}tdtfi|d6|d6�}nX|dkr�|t|<n
|||<dS(s�Register a new serializer.

    ``serializer_module`` should be the fully qualified module name
    for the serializer.

    If ``serializers`` is provided, the registration will be added
    to the provided dictionary.

    If ``serializers`` is not provided, the registration will be made
    directly into the global register of serializers. Adding serializers
    directly is not a thread-safe operation.
    tBadSerializerModuletDeserializert
SerializerN(	tNonet_serializerst_load_serializersRt
import_moduletImportErrorRttypetobject(tformattserializer_moduletserializerstmoduletexctbad_serializer((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pytregister_serializer4s


cCs6tst�n|tkr+t|��nt|=dS(sCUnregister a given serializer. This is not a thread-safe operation.N(RRR(R((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pytunregister_serializerTs

cCs6tst�n|tkr+t|��nt|jS(N(RRRR(R((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pytget_serializer\s

cCstst�ntt�S(N(RRtlist(((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pytget_serializer_formatscs
cCsBtst�ngtjt�D]\}}|jjs |^q S(N(RRRt	iteritemsRR(tktv((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pytget_public_serializer_formatshs
cCs6tst�n|tkr+t|��nt|jS(N(RRRR(R((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pytget_deserializerms

cKs)t|��}|j||�|j�S(sn
    Serialize a queryset (or any iterator that returns database objects) using
    a certain serializer.
    (R&t	serializetgetvalue(Rtquerysettoptionsts((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pyR.tscKst|�}|||�S(s
    Deserialize a stream or a string. Returns an iterator that yields ``(obj,
    m2m_relation_dict)``, where ``obj`` is a instantiated -- but *unsaved* --
    object, and ``m2m_relation_dict`` is a dictionary of ``{m2m_field_name :
    list_of_related_objects}``.
    (R-(Rtstream_or_stringR1td((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pytdeserialize}scCsri}x"tD]}t|t||�q
Wttd�rhx+tjD]}t|tj||�qDWn|adS(s�
    Register built-in and settings-defined serializers. This is done lazily so
    that user code has a chance to (e.g.) set up custom settings without
    needing to be careful of import order.
    tSERIALIZATION_MODULESN(tBUILTIN_SERIALIZERSR$thasattrRR6R(R R((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pyR�s
N(Rtdjango.confRtdjango.utilsRRtdjango.core.serializers.baseRR7RRRRR$R%R&R(R,R-R.R5R(((sB/tmp/pip-install-XxeQeY/django/django/core/serializers/__init__.pyt<module>s(
 								

https://t.me/AnonymousX5 - 2025