o
    ^"<f©  ã                   @   s\   d dl mZ d dlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ G dd	„ d	eƒZd
S )é    )ÚNO_DB_ALIAS)ÚDatabaseWrapperé   )ÚDatabaseFeatures)ÚPostGISIntrospection)ÚPostGISOperations)ÚPostGISSchemaEditorc                       s,   e Zd ZeZ‡ fdd„Z‡ fdd„Z‡  ZS )r   c                    sH   t ƒ j|i |¤Ž | dd¡tkr"t| ƒ| _t| ƒ| _t| ƒ| _	d S d S )NÚaliasÚ )
ÚsuperÚ__init__Úgetr   r   Úfeaturesr   Úopsr   Úintrospection)ÚselfÚargsÚkwargs©Ú	__class__© úb/var/www/html/kck/venv/lib/python3.10/site-packages/django/contrib/gis/db/backends/postgis/base.pyr      s   

ýzDatabaseWrapper.__init__c                    sB   t ƒ  ¡  |  ¡ }| d¡ W d   ƒ d S 1 sw   Y  d S )Nz&CREATE EXTENSION IF NOT EXISTS postgis)r   Úprepare_databaseÚcursorÚexecute)r   r   r   r   r   r      s   

"ÿz DatabaseWrapper.prepare_database)Ú__name__Ú
__module__Ú__qualname__r   ÚSchemaEditorClassr   r   Ú__classcell__r   r   r   r   r      s    r   N)Údjango.db.backends.base.baser   Ú"django.db.backends.postgresql.baser   ÚPsycopg2DatabaseWrapperr   r   r   r   Ú
operationsr   Úschemar   r   r   r   r   Ú<module>   s    