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
1 answer

django building a get_page_url function in model to return list with pagination number

I have a scenario where items are paginated from list of items in a model and I want to create a function to return the page which contains this item. for example class Item(models.Model): subject = models.CharField(max_length=200) Assuming i…
Mo J. Mughrabi
  • 6,747
  • 16
  • 85
  • 143
0
votes
1 answer

Reverse pagination order in Django Endless Pagination

The default pagination for Django Endless Pagination(which is working perfect for me) shows the oldest object first and then pagniates through newer ones i.e, the last page contains the newest object. I am trying to use this to paginate comments and…
0
votes
1 answer

'Manager' object is unsubscriptable error on Django pagination

In Django 1.4.2, I use a simple pagination code like given in official documentation: ... paginator = Paginator(songs, 25) # Show 25 songs per page page = request.GET.get('page') try: songs = paginator.page(page) except PageNotAnInteger: #…
Murat Çorlu
  • 8,207
  • 5
  • 53
  • 78
0
votes
1 answer

How to make Django pagination search engine friendly?

I am wondering how can I make Django pagination search engine friendly, like: object/224 instead of object?page=224 Also, anyone has an idea why it's not by default search engine friendly!?
azio
  • 575
  • 1
  • 6
  • 12
0
votes
1 answer

Django pagination, looing through but now showing data

will try and keep it simple! :) I've setup pagination within my django app. I'm manaing to loop through the pages i've setup in my pagination. There are 12 pages with 10 news posts per page. I'm able to click next and the page number I wish to view…
JDavies
  • 2,730
  • 7
  • 34
  • 54
0
votes
1 answer

django endless pagination(twitter style) not working - .endless_more class not in html but used in js

i am using django endless pagination . its working normally that just shows the numbers at the bottom . but, i tried to integrate twitter style into…
user1653509
  • 153
  • 1
  • 3
  • 10
0
votes
2 answers

Django pagination on a largeset of data

I am using a template for displaying a table which has more than 2000 rows.But implementing django pagination in this makes it too slow as the data is too much.What is the best way to go about this.Or how can i make the pagination load 200 rows per…
Rajeev
  • 44,985
  • 76
  • 186
  • 285
0
votes
1 answer

How do I pass a template variable as part of a string parameter to a template tag?

I use this link for my template. My intention is to bring the user to the next page of a paginated.. well, page: Next The problem is page.next_page_number is not evaluated as the…
user1472268
0
votes
3 answers

Django-haystack and django-pagination not working together?

I use haystack with whoosh, and django 1.3. In my url I have: url(r'^search/', include('haystack.urls')), I created custom template in app: search/seach.html: {% if page.object_list %} {%…
0
votes
1 answer

getting multiple paginator

If I include paginator, then its printing multiple paginator on same page. because I am including in forloop. How do I solve this problem? please help ---------------------- {% autopaginate recipes %} {% for recipe in recipes %} {{ forloop.counter…
user514310
-1
votes
1 answer

How to avoid duplicate objects in django pagination when order_by('?')

I am using viewset in rest framework. I am getting same objects in different paginated pages. How can I avoid it. class Viewset(viewsets.ModelViewSet): queryset = Model.objects.all().order_by('?') serializer_class = MySerializer …
-1
votes
1 answer

Pagination issue with Haystack

I am using alphabetical pagination with haystack that I borrowed from https://djangosnippets.org/snippets/1364/ But named pagination is hitting the database which it shouldn't. Line 15 is causing this, although I have same iteration code in a django…
Chirdeep Tomar
  • 4,281
  • 8
  • 37
  • 66
-2
votes
3 answers

django-endless-pagination django-pagination records index on page and total

Is there an option to see records index on the current page and total? For example: Records 51-100, 980 total on page #2 I could maybe use a {% with object_list.count as "pages_total" %} templatetag then lots of code.. and {% endwith %} at the end…
-2
votes
1 answer

Getting localhost for next page url in production

hlo, I have deployed a Django rest app in production. When I call a list API there is a pagination, and I am getting localhost for next page URL. I am using GenericViewSet and LimitOffsetPagination for pagination. My app is running in docker…
-6
votes
2 answers

django invalid syntax (pagination_tags.py, line 225)

Environment: Request Method: GET Request URL: http://www.qiuqingyu.cn/cnki_spider/todolist/ Django Version: 1.9 Python Version: 3.6.0 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', …
1 2 3
19
20