Saturday, 15 August 2015

python - multiple pagination in django class based view - listview -



python - multiple pagination in django class based view - listview -

the code below paginates queryset how can paginate context['guser1']

class authorlist(listview): template_name = 'authorlist.html' paginate_by = 10 queryset = author.objects.order_by('date') def get_context_data(self, **kwargs): context = super(authorlist, self).get_context_data(**kwargs) context['guser1'] = author.objects.order_by('date') homecoming context

you'll have utilize paginator object in view. here docs.

python django django-views django-class-based-views

No comments:

Post a Comment