
    h                     t    S SK r S SKJr  S SKJr  S SKJr  S SKJr   S SK	r	S rS rS	 rg! \
 a    Sr	 Nf = f)
    N)BytesIO)settings)HttpResponse)loaderFc                 6   [        5       n[        R                  " US[        R                  5       nUR	                  SU R                  [        R                  5      5        SSS5        UR                  S5        UR                  5       $ ! , (       d  f       N/= f)z0Return compressed KMZ from the given KML string.azdoc.kmlNr   )
r   zipfileZipFileZIP_DEFLATEDwritestrencoder   DEFAULT_CHARSETseekread)kmlkmzzfs      N/var/www/html/env/lib/python3.13/site-packages/django/contrib/gis/shortcuts.pycompress_kmlr      sc    
)C	c7#7#7	8B
Iszz(*B*BCD 
9HHQK88: 
9	8s   0B


Bc                  >    [        [        R                  " U 0 UD6SS9$ )z9Render the response as KML (using the correct MIME type).z$application/vnd.google-earth.kml+xmlcontent_type)r   r   render_to_stringargskwargss     r   render_to_kmlr      s%    00;     c            	      P    [        [        [        R                  " U 0 UD65      SS9$ )zK
Compress the KML content and return as KMZ (using the correct
MIME type).
z application/vnd.google-earth.kmzr   )r   r   r   r   r   s     r   render_to_kmzr        s,    
 V,,d=f=>7 r   )r	   ior   django.confr   django.httpr   django.templater   numpyImportErrorr   r   r     r   r   <module>r(      sA        $ "
+  Es   , 77