Questions tagged [django-pagination]

Django-pagination refers to the Django (a Python-based and open-source web framework) way of managing data split across several pages, with "Previous/Next" links. Use this tag for questions related to classes related to pagination in Django.

Django-pagination refers to the Django (a Python-based and open-source web framework) way of managing data split across several pages, with "Previous/Next" links. Use this tag for questions related to classes related to pagination in Django.

300 questions
0
votes
0 answers

Django Paginator gives error __init__() missing 2 required positional arguments: 'number' and 'paginator'

I have used the following code from Django Documentation and for some reason the code doesn't work
sly_Chandan
  • 3,437
  • 12
  • 54
  • 83
0
votes
1 answer

Django pagination work very slow when Dataset is too large

Django Pagination is very slow when dataset is very large(>100k) my dataset is 80 columns and more than 100k rows. when i load the page or change the page it takes 14-15 second Is there anything that i can do to make it fast what can i do to make it…
0
votes
0 answers

Django pagination with mysql databse not working properly

I am trying to connection Django pagination with mysql Database but i am facing some problem Problem it's work fine when data is less. but when data is in millions it take 2-3 minutes to load the data in html page, even i am fetching only 100…
user10989738
  • 81
  • 1
  • 11
0
votes
0 answers

Get context from another CBV with Django

I would like to get your help in order to use context from a Django CBV in another CBV through get_context_data(). Objective: Basically, I have a django ListView() with pagination. I pick up the current page in get_context_data(). Then, I would…
Essex
  • 6,042
  • 11
  • 67
  • 139
0
votes
1 answer

Django: Combining search view with Pagination

In a Django CBV (ListView), after submitting a form using GET method, with filter_1 and filter_2 fields, the resulting URL I get is something like: http://example.com/order/advanced-search?filter_1=foo&filter_2=bar Everything is ok. However, I'd…
David Dahan
  • 10,576
  • 11
  • 64
  • 137
0
votes
1 answer

Error "count() takes exactly 2 arguments (1 given)" in pagination function with django

Despite the fact that I have fetched successfully the data from the db and created my paginator, i find myself struggling returning the data and finally show the data in json format. I found useful this post…
gtopal
  • 544
  • 1
  • 9
  • 35
0
votes
1 answer

Pagination: how to set the number of pages?

I have a view for showing the list of news items: def index(request, page_number=1): news_list = get_list_or_404(NewsItem.objects.order_by('-pub_date')) news_paginator = Paginator(news_list, 10) return render(request, 'news/index.html',…
corpus
  • 27
  • 4
0
votes
1 answer

Django Infinite scroll using Django Paginate repeating the queryset

Intro: I am using the the below link to add infinite scroll to my project https://simpleisbetterthancomplex.com/tutorial/2017/03/13/how-to-create-infinite-scroll-with-django.html below is the github code for that…
Samir Tendulkar
  • 1,151
  • 3
  • 19
  • 47
0
votes
2 answers

Django pagination error

I have created a Django application. There is a filtering functionality in my application. The filtered data is shown in a separate page. Now I want to give Django Pagination to the filtered list page. While doing it, I came into this error. The…
rv_k
  • 2,383
  • 7
  • 39
  • 52
0
votes
1 answer

Pagination using ListView and a dynamic/filtered queryset

I have a class based view that I am using to display a queryset in a table. I am also using a couple formsets to filter this queryset. I am using the get_queryset() method provided as part of the generic.ListView class to filter the diplayed…
0
votes
1 answer

CSS Classes in django-pagination package

I'm tring to use django-pagination package(http://pypi.python.org/pypi/django-pagination) and I found out that in pagination template they use the following CSS classes: etc Why do they use…
Alex
  • 27
  • 3
0
votes
2 answers

Django - pagination and sorting list

I want to make view which display list of model objects in table. I want to add sorting feature. There is possibility to do sorting like here: https://codepen.io/imarkrige/pen/vgmij in Django? I mean this Arrows in column names. Where on click is…
orzel
  • 15
  • 1
  • 7
0
votes
1 answer

Why does my CursorPagination class always return the same previous link?

Trying to paginate a large queryset so I can return to the same position I was in previously even if data has been added to the database. Currently I have as my pagination class: from rest_framework.pagination import CursorPagination class…
B.Adler
  • 1,499
  • 1
  • 18
  • 26
0
votes
1 answer

Multiple Get in django templates

Hi I have multiple pagination in a single page. Lets say, I am displaying two lists. list1 and list2. in the views I have paginated them using django paginator and I GET two variables list1_page and list2_page. now my template looks like this {{…
dushyant88
  • 53
  • 5
0
votes
1 answer

Django CBV ListView, accessing both paginated and unpaginated results

I built a list view using generic view class ListView with pagination and search functionality. Now I want to include in the same page a map with markers for all the results, without pagination. Is there a way to reach both paginated and unpaginated…
yam
  • 1,383
  • 3
  • 15
  • 34