#16085: pagination documentary code raises error ----------------------------+------------------------------- Reporter: kaup.steffen@… | Owner: nobody Type: Uncategorized | Status: new Milestone: | Component: Documentation Version: 1.3 | Severity: Normal Keywords: | Triage Stage: Unreviewed Has patch: 0 | Easy pickings: 0 ----------------------------+------------------------------- about this doc page [[BR]] [http://docs.djangoproject.com/en/dev/topics/pagination/?from=olddocs #using-paginator-in-a-view] {{{ from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
def listing(request): contact_list = Contacts.objects.all() paginator = Paginator(contact_list, 25) # Show 25 contacts per page page = request.GET.get('page') }}} [[BR]] the last line raises error: int() argument must be a string or a number, not 'NoneType' [[BR]] {{{ page = request.GET.get('page',1) }}} fixed this in my case -- Ticket URL: <https://code.djangoproject.com/ticket/16085> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.