| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/django/contrib/gis/sitemaps/__pycache__/ |
Upload File : |
�
�|�ef � �z � d dl mZ d dlmZ d dlmZ d dlmZ d dlm Z G d� de� � Z
G d� d e
� � Zd
S )� )�apps)�
GeometryField)�Sitemap)�models)�reversec �8 � e Zd ZdZdZd
d�Zd� Zdd�Zd� Zd � Z dS )�
KMLSitemapz1
A minimal hook to produce KML sitemaps.
�kmlNc �: � | � |� � | _ d S �N)�_build_kml_sources� locations)�selfr s �A/usr/lib/python3/dist-packages/django/contrib/gis/sitemaps/kml.py�__init__zKMLSitemap.__init__ s � � �0�0��;�;����� c �� � g }|�t j � � }|D ]�}t |t j j � � rV|j j D ]H}t |t � � r1|� |j j
|j j |j f� � �I�wt |t t f� � r8t |� � dk rt! d� � �|� |� � ��t# d� � �|S )z�
Go through the given sources and return a 3-tuple of the application
label, module name, and field name of every GeometryField encountered
in the sources.
If no sources are provided, then all models.
N� z?Must specify a 3-tuple of (app_label, module_name, field_name).z)KML Sources must be a model or a 3-tuple.)r �
get_models�
isinstancer �base� ModelBase�_meta�fieldsr �append� app_label�
model_name�name�list�tuple�len�
ValueError� TypeError)r �sources�kml_sources�source�fields r r
zKMLSitemap._build_kml_sources s � � ���?��o�'�'�G�� M� M�F��&�&�+�"7�8�8�
M�#�\�0� 9� 9�E�!�%��7�7� 9�#�*�*�F�L�,B�,2�L�,C�,1�J�,8� 9� 9� 9��9�
�F�T�5�M�2�2�
M��v�;�;�!�#�#�$�%f�g�g�g��"�"�6�*�*�*�*�� K�L�L�L��r � c �T � t j | |||�� � }|D ]}| j |d<