ó
O'—^c           @   sM   d  d l  m Z d  d l m Z d  d l m Z d e j f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   OrderedDict(   t
   pagination(   t   Responset   GeoJsonPaginationc           B   s   e  Z d  Z d Z d „  Z RS(   s>   
    A geoJSON implementation of a pagination serializer.
    t	   page_sizec      	   C   sP   t  t d d |  j j j f d |  j ƒ  f d |  j ƒ  f d | d f g ƒ ƒ S(   Nt   typet   FeatureCollectiont   countt   nextt   previoust   features(   R   R   (   R   R    t   paget	   paginatorR   t   get_next_linkt   get_previous_link(   t   selft   data(    (    s?   /tmp/pip-unpacked-wheel-aI1tzL/rest_framework_gis/pagination.pyt   get_paginated_response   s    (   t   __name__t
   __module__t   __doc__t   page_size_query_paramR   (    (    (    s?   /tmp/pip-unpacked-wheel-aI1tzL/rest_framework_gis/pagination.pyR      s   N(   t   collectionsR    t   rest_frameworkR   t   rest_framework.responseR   t   PageNumberPaginationR   (    (    (    s?   /tmp/pip-unpacked-wheel-aI1tzL/rest_framework_gis/pagination.pyt   <module>   s   