I have a different design on the first page of a list, and need 8 items on the first page. On the rest I would like 9 items. I have tried to specify items on the first page, but the second page thinks the 9.th item was shown on the first page, it was not. Anyone know if it is possible to fix this?
class EntryList(ListView):
model = Entry
def get_paginate_by(self, queryset):
page_kwarg = self.page_kwarg
page = self.kwargs.get(page_kwarg) or self.request.GET.get(page_kwarg) or '1'
if page == '1':
self.paginate_by = 8
else:
self.paginate_by = 9 #This assumes the 9.th was shown on the first page
return self.paginate_by