
    h                     N    d dl mZmZ d dlmZ  G d de      Z G d dee      Zy)    )	FileField
ImageField)filesc                   :     e Zd ZdZej
                  Z fdZ xZS )ThumbnailerFieldz
    A file field which provides easier access for retrieving (and generating)
    thumbnails.

    To use a different file storage for thumbnails, provide the
    ``thumbnail_storage`` keyword argument.
    c                 R    |j                  dd       | _        t        |   |i | y )Nthumbnail_storage)popr	   super__init__selfargskwargs	__class__s      F/home/dcms/DCMS/lib/python3.12/site-packages/easy_thumbnails/fields.pyr   zThumbnailerField.__init__   s+     "(,?!F$)&)    )	__name__
__module____qualname____doc__r   ThumbnailerFieldFile
attr_classr   __classcell__r   s   @r   r   r      s     ++J* *r   r   c                   :     e Zd ZdZej
                  Z fdZ xZS )ThumbnailerImageFielda  
    An image field which provides easier access for retrieving (and generating)
    thumbnails.

    To use a different file storage for thumbnails, provide the
    ``thumbnail_storage`` keyword argument.

    To thumbnail the original source image before saving, provide the
    ``resize_source`` keyword argument, passing it a usual thumbnail option
    dictionary. For example::

        ThumbnailerImageField(
            ..., resize_source=dict(size=(100, 100), sharpen=True))
    c                 R    |j                  dd       | _        t        |   |i | y )Nresize_source)r
   r   r   r   r   s      r   r   zThumbnailerImageField.__init__(   s*     $ZZ>$)&)r   )	r   r   r   r   r   ThumbnailerImageFieldFiler   r   r   r   s   @r   r   r      s     00J* *r   r   N)django.db.models.fields.filesr   r   easy_thumbnailsr   r   r    r   r   <module>r$      s&    ? !*y *$*,j *r   