o
     Þh«  ã                   @   s<   d Z ddlmZ ddlmZ ddlmZ dd„ Zdd„ Z	d	S )
zZ
utils.py        # Shared helper functions

See schemas.__init__.py for package overview.
é    )Úmodels)Úgettext_lazy)ÚRetrieveModelMixinc                 C   sZ   t |dƒr
|jdkS | ¡ dkrdS t|tƒrdS |  d¡ d¡}|r+d|d v r+dS dS )	zP
    Return True if the given path/method appears to represent a list view.
    ÚactionÚlistÚgetFú/Ú{éÿÿÿÿT)Úhasattrr   ÚlowerÚ
isinstancer   ÚstripÚsplit)ÚpathÚmethodÚviewÚpath_components© r   ú\/var/www/html/premium_crap/venv/lib/python3.10/site-packages/rest_framework/schemas/utils.pyÚis_list_view   s   


r   c                 C   sJ   t |tjƒrtdƒ}nt |tjƒrtdƒ}ntdƒ}tdƒj|| jjd�S )Nzunique integer valuezUUID stringzunique valuez'A {value_type} identifying this {name}.)Ú
value_typeÚname)r   r   Ú	AutoFieldÚ_Ú	UUIDFieldÚformatÚ_metaÚverbose_name)ÚmodelÚmodel_fieldr   r   r   r   Úget_pk_description   s   

þr!   N)
Ú__doc__Ú	django.dbr   Údjango.utils.translationr   r   Úrest_framework.mixinsr   r   r!   r   r   r   r   Ú<module>   s    