o
    þâfÕ  ã                   @   s    d dl mZ G dd„ deƒZdS )é    )ÚDeferredAttributec                   @   s   e Zd ZdZdd„ ZdS )ÚAutoDeserializedAttributeaW  
    Use as the descriptor_class for a Django custom field.
    Allows setting the field to a serialized (typically string) value,
    and immediately reflecting that as the deserialized `to_python` value.

    (This requires that the field's `to_python` returns the same thing
    whether called with a serialized or deserialized value.)
    c                 C   s   | j  |¡}||j| j j< d S )N)ÚfieldÚ	to_pythonÚ__dict__Úattname)ÚselfÚinstanceÚvalue© r   úG/var/www/html/venv/lib/python3.10/site-packages/timezone_field/utils.pyÚ__set__   s   z!AutoDeserializedAttribute.__set__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r      s    r   N)Údjango.db.models.query_utilsr   r   r   r   r   r   Ú<module>   s    