Must extract paginate_by from kwargs to use it.

This commit is contained in:
Bradley M. Kuhn 2015-03-04 15:07:30 -08:00
parent b7316e0555
commit 1ed42c6c89

View file

@ -66,6 +66,7 @@ def custom_index(request, queryset, *args, **kwargs):
kwargs['queryset'] = queryset
kwargs['extra_context'] = extra_context
paginate_by = kwargs.get('paginate_by', 6) # Show 6 news items per page, by default
paginator = Paginator(queryset, paginate_by)
page = request.GET.get('page')