https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/django/contrib/gis/sitemaps/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/django/contrib/gis/sitemaps/__pycache__/kml.cpython-310.pyc
o

�af	�@s`ddlmZddlmZddlmZddlmZddlm	Z	Gdd�de�Z
Gdd	�d	e
�Zd
S)�)�apps)�
GeometryField)�Sitemap)�models)�reversec@s@eZdZdZdZddd�Zdd�Zdd	d
�Zdd�Zd
d�Z	dS)�
KMLSitemapz1
    A minimal hook to produce KML sitemaps.
    �kmlNcCs|�|�|_dS�N)�_build_kml_sources�	locations)�selfr�r
�A/usr/lib/python3/dist-packages/django/contrib/gis/sitemaps/kml.py�__init__szKMLSitemap.__init__cCs�g}|dur
t��}|D]=}t|tjj�r/|jjD]}t|t�r-|�	|jj
|jj|jf�qqt|t
tf�rFt|�dkr@td��|�	|�qtd��|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�fieldr
r
rr
s&

���zKMLSitemap._build_kml_sources�cCs*tj||||d�}|D]}|j|d<q|S)z|
        This method is overridden so the appropriate `geo_format` attribute
        is placed on each URL element.
        )�page�site�protocol�
geo_format)r�get_urlsr()rr%r&r'�urls�urlr
r
rr)-szKMLSitemap.get_urlscCs|jSr	)r)rr
r
r�items7szKMLSitemap.itemscCs&td|j|d|d|dd�d�S)Nz$django.contrib.gis.sitemaps.views.%srr$�)�label�model�
field_name)�kwargs)rr()r�objr
r
r�location:s��zKMLSitemap.locationr	)r$NN)
�__name__�
__module__�__qualname__�__doc__r(rr
r)r,r3r
r
r
rrs


rc@seZdZdZdS)�
KMZSitemap�kmzN)r4r5r6r(r
r
r
rr8Esr8N)�django.appsr�django.contrib.gis.db.modelsr�django.contrib.sitemapsr�	django.dbr�django.urlsrrr8r
r
r
r�<module>s=

https://t.me/RX1948 - 2025