U
    mKÂh  ã                   @   s,   d dl mZ d dlmZ G dd„ deƒZdS )é    )ÚPageNumberPagination)ÚResponsec                   @   s    e Zd ZdZdZdZdd„ ZdS )ÚCustomPageNumberPaginationé
   Ú	page_sizeéd   c              	   C   s6   t | jj| jjj| jjj| jjj|  ¡ |  ¡ |dœƒS )N)Úpager   Ztotal_itemsZtotal_pagesÚnextÚpreviousÚresults)	r   r   ÚnumberÚ	paginatorÚper_pageÚcountÚ	num_pagesZget_next_linkZget_previous_link)ÚselfÚdata© r   úAD:\Project\agus\mfile_papteng_new\webapp\api\seting\pagination.pyÚget_paginated_response
   s    ùz1CustomPageNumberPagination.get_paginated_responseN)Ú__name__Ú
__module__Ú__qualname__r   Zpage_size_query_paramZmax_page_sizer   r   r   r   r   r      s   r   N)Zrest_framework.paginationr   Úrest_framework.responser   r   r   r   r   r   Ú<module>   s   