Skip to content

Commit

Permalink
Added default page_size_query_param in GeoJsonPagination
Browse files Browse the repository at this point in the history
paginate_by_param in views was deprecated in DRF 3.2
  • Loading branch information
nemesifier committed Sep 9, 2015
1 parent 048a6df commit 52e15a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions rest_framework_gis/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class GeoJsonPagination(pagination.PageNumberPagination):
"""
A geoJSON implementation of a pagination serializer.
"""
page_size_query_param = 'page_size'

def get_paginated_response(self, data):
return Response(OrderedDict([
('type', 'FeatureCollection'),
Expand Down
1 change: 0 additions & 1 deletion tests/django_restframework_gis_tests/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class GeojsonLocationList(generics.ListCreateAPIView):
serializer_class = LocationGeoFeatureSerializer
queryset = Location.objects.all()
pagination_class = GeoJsonPagination
paginate_by_param = 'page_size'

geojson_location_list = GeojsonLocationList.as_view()

Expand Down

0 comments on commit 52e15a5

Please sign in to comment.