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__/views.cpython-310.pyc
o

�a	�@s�ddlmZddlmZddlmZmZddlmZm	Z	ddl
mZddlm
Z
mZddlmZdd	e
fd
d�Zde
fdd
�ZdS)�)�apps)�
GeometryField)�AsKML�	Transform)�
render_to_kml�
render_to_kmz)�FieldDoesNotExist)�DEFAULT_DB_ALIAS�connections)�Http404NFc
Cs"g}zt�||�}Wntytd||f��w|r7z|j�|�}t|t�s*t�Wnty6td��wt	|}	|	j
jrL|j�
|�jt|�d�}n7g}|	j
jrj|j�
|�jd
id|t|d�i��}
|d7}n|j�
|���}
|
D]}t||�j|_|�|�qt|r�t}nt}|dd|i�S)z�
    This view generates KML for the given app label, model, and field name.

    The field name must be that of a geographic field.
    z?You must supply a valid app label and module name.  Got "%s.%s"zInvalid geometry field.��kmlz%s_4326i��_4326zgis/kml/placemarks.kml�placesN�)r�	get_model�LookupErrorr�_meta�	get_field�
isinstancerrr
�features�has_AsKML_function�_default_manager�using�annotater�has_Transform_functionr�all�getattrr
�appendrr)
�request�label�model�
field_name�compressr�
placemarks�klass�field�
connection�qs�mod�renderrr�C/usr/lib/python3/dist-packages/django/contrib/gis/sitemaps/views.pyr

s@�
���
r
cCst||||d|d�S)zD
    Return KMZ for the given app label, model, and field name.
    T)r#rr)rr r!r"rrrr+�kmz9sr,)�django.appsr�django.contrib.gis.db.modelsr�&django.contrib.gis.db.models.functionsrr�django.contrib.gis.shortcutsrr�django.core.exceptionsr�	django.dbr	r
�django.httprr
r,rrrr+�<module>s/

https://t.me/RX1948 - 2025