--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/82e3fe0e-e872-4a49-b869-2b67001e3270%40googlegroups.com.
Try this one :
paginator = Paginator(queryset_list,8) # Show 25 contacts per page
page_request_var = "page"
page = request.GET.get(page_request_var)
try:
queryset = paginator.page(page)
except PageNotAnInteger:
# If page is not an integer, deliver first page.
queryset = paginator.page(1)
except EmptyPage:
# If page is out of range (e.g. 9999), deliver last page of results.
queryset = paginator.page(paginator.num_pages)
From: leb dev
Sent: Wednesday, September 25, 2019 2:32 PM
To: Django users
--
That page number is not an integer
i tried your answer and display an error :That page number is not an integer
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0323b126-726e-4889-beee-b68988b1a3f1%40googlegroups.com.
<div class="pagination"><span class="step-links">{% if object_list.has_previous %}<a href="?{{page_request_var}}=1">« first</a><a href="?{{page_request_var }}={{ object_list.previous_page_number }}{% if request.GET.q%}&q={{request.GET.q }}{% endif %}">previous</a>{% endif %}<span class="current">Page {{ object_list.number }} of {{ object_list.paginator.num_pages }}.</span>{% if object_list.has_next %}<a href="?{{page_request_var}}={{ object_list.next_page_number }}{% if request.GET.q%}&q={{request.GET.q }}{% endif %}">next</a><a href="?{{page_request_var}}={{ object_list.paginator.num_pages }}">last »</a>{% endif %}</span></div>
Would you send your html codes relating to pagination
در تاریخ چهارشنبه ۲۵ سپتامبر ۲۰۱۹، ۱۵:۰۳ leb dev <testd...@gmail.com> نوشت:
i tried your answer and display an error :--That page number is not an integer
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.