retract the default page stuff.

better way comming in a seperate pr
This commit is contained in:
Ross McFarland 2013-10-21 14:23:06 -07:00
parent 63e6a3b492
commit f0a129dcda

View File

@ -145,15 +145,7 @@ class GenericAPIView(views.APIView):
allow_empty_first_page=self.allow_empty)
page_kwarg = self.kwargs.get(self.page_kwarg)
page_query_param = self.request.QUERY_PARAMS.get(self.page_kwarg)
page = page_kwarg or page_query_param
if not page:
# we didn't recieve a page
if hasattr(paginator, 'default_page_number'):
# our paginator has a method that will provide a default
page = paginator.default_page_number()
else:
# fall back on the base default value
page = 1
page = page_kwarg or page_query_param or 1
try:
page_number = paginator.validate_number(page)
except InvalidPage: