Must extract paginate_by from kwargs to use it.
This commit is contained in:
parent
b7316e0555
commit
1ed42c6c89
1 changed files with 1 additions and 0 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue