← Back
Editing: xml_serializer.cpython-311.pyc
� 48zj�F � � � d Z ddlZddlmZ ddlmZmZ ddlmZ ddl m Z ddlm Z ddlmZ dd lmZ dd lmZ ddlmZmZ ddlmZmZ ed � � � Z G d� dej � � Z G d� dej � � Zd� Zd� Z G d� de� � Z G d� de � � Z! G d� de!� � Z" G d� de!� � Z# G d� de!� � Z$dS )z XML serializer. � N)�contextmanager)�minidom�pulldom)�handler)�ExpatParser)�apps)�settings)�ObjectDoesNotExist)�base)�DEFAULT_DB_ALIAS�models)�SimplerXMLGenerator�UnserializableContentErrorc # �� K � d} t t dd� � x}r|j dk } | s d� t _ dV � |r| s|t _ dS dS dS # |r| s|t _ w xY w)z�Workaround for performance issues in minidom document checks. Speeds up repeated DOM operations by skipping unnecessary full traversal of the DOM tree. F�_in_documentNz<lambda>c �* � t | j � � S �N)�bool� ownerDocument)�nodes �H/usr/lib/python3/dist-packages/django/core/serializers/xml_serializer.py�<lambda>z%fast_cache_clearing.<locals>.<lambda> s � ��T�5G�0H�0H� � )�getattrr �__name__r )�module_helper_was_lambda�original_fns r �fast_cache_clearingr s� � � � � %���g�~�t�<�<�<�{� I�#.�#7�:�#E� �'� I�#H�#H�G� �/� ����� /�7� /�#.�G� � � � /� /� /� /��;� /�7� /�#.�G� �.�.�.�.s �A �A$c �H � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � ZdS )� SerializerzSerialize a QuerySet to XML.c � � | j � d� � �=| j � dd| j � d� � z |z z � � d S d S )N�indent� � )�options�get�xml�ignorableWhitespace)�self�levels r r"