a
    Sic                     @   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r2dS | dd}|rVd|d v rVd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viewZpath_components r   X/var/www/html/django/DPS/env/lib/python3.9/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   Zrest_framework.mixinsr   r   r    r   r   r   r   <module>   s
   