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
7
votes
6 answers

Django Filter with Pagination

I'm attempting to follow the following tutorial for pagination with django filters, but the tutorial seems to be missing something, and i'm unable to get the pagination to show using the function based views method. …
user1470034
  • 671
  • 2
  • 8
  • 23
7
votes
2 answers

How to re-render django template code on AJAX call

I have a view which sends paginated object (on a queryset) to a template, which I further render in template as a table. What I am trying to do is on clicking a page number on pagination bar on template, it should make an ajax call to get paginated…
MohitC
  • 4,541
  • 2
  • 34
  • 55
7
votes
2 answers

Can django-pagination do multiple paginations per page?

If it can't then are there any other alternatives (either Django's native pagination or an alternate package) that allows multiple paginations per page? I would like to display a list of about 5 objects with each object having its own pagination…
hobbes3
  • 28,078
  • 24
  • 87
  • 116
6
votes
1 answer

How to properly display all inline fields associated with its parent model fields when paginating in Django template?

I'm a student and a Django newbie, and we have a project that we're trying to build using Django. In my journey to building the project I stumbled upon a problem and got stuck for weeks now. I want to display all the inline fields associated with…
6
votes
2 answers

How to use get_elided_page_range in Django paginator?

There is new option to create pagination range - get_elided_page_range https://docs.djangoproject.com/en/3.2/ref/paginator/#django.core.paginator.Paginator.get_elided_page_range How should I use it? How can I set args? I am using CBV ListView. I…
Vadim Beglov
  • 343
  • 1
  • 4
  • 15
6
votes
2 answers

Paginate a filter

I have a filter with a dependent drop down for cars makes and models. Since I don't want to display all of them on one page I added a paginator. The issue is the filter works correctly but it does not carry over in the pages when the filter is…
Wazy
  • 462
  • 4
  • 17
5
votes
3 answers

django pagination "That page contains no results"

I want to use django pagination. The first page is able to load products but the last page is not showing them. Here is my index view: def index(request): categories = Category.objects.filter(parent_category=None) product_list =…
5
votes
1 answer

Django pagination (get page no. corresponding to the object)

I have a paginate I am trying to get the index page from an object page (sort of pagination in reverse) The get_paginated_posts returns a paginator for the model Post: class PostManager(models.Manager): def get_paginated_posts(self,…
crodjer
  • 13,384
  • 9
  • 38
  • 52
5
votes
3 answers

How disable django admin pagination?

I need turn off django admin pagination. I use mttp in django and I need disable pagination on some admin module. How I can do it? Or how I can make pagination only by parents?
5
votes
0 answers

django-paging unhashable type

paginators.py (of django-paging package): try: _page = EndlessPage(list(self.object_list[bottom:top]), number, self) this line gives a `TypeError: unhashable type error, although that object_list comes from a standard QuerySet that can be used…
Void Null
  • 51
  • 2
5
votes
4 answers

keyError in Django. During template rendering

Sorry if its a noob code or question. I am doing pagination using django-pagination and I am doing it like this.But this gives me keyError at on my page furthermore it mentions that its an error during template rendering. What I am doing wrong…
John Doe
  • 2,752
  • 5
  • 40
  • 58
5
votes
1 answer

Using autopagination in django and formatting issues

I'm using django-paginate and getting weird formatting issues with the {% paginate %} tag. I have attached an image of the problem. I was just wondering what could be potentially causing this? In the image below I'm on the first page. Notice that…
user1328021
  • 9,110
  • 14
  • 47
  • 78
4
votes
2 answers

Use django-pagination to generate link refl=next/prev

I'm using django-pagination to paginate my pages. It works great, but I would like to set up to the , like it is…
Ondrej Skalicka
  • 3,046
  • 9
  • 32
  • 53
4
votes
1 answer

Django Pagination Keep Current URL Parameters

I am developing a blog website using Django. On the home page, I have a list of posts, and they are viewed using pagination. On the same home page, I also have the functionality to do a text search (i.e. search for posts with a given text). For…
Software Dev
  • 910
  • 3
  • 10
  • 27
4
votes
1 answer

How to return the last page when using pagination in django?

In a simple forum, I'm using native django Pagination I'd like users to be directed to the last page in a thread after they posted there. Here is the view @login_required def topic_reply(request, topic_id): tform = PostForm() topic =…
Jand
  • 2,527
  • 12
  • 36
  • 66
1
2
3
19 20