Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6941939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:57:01+00:00 2026-05-27T12:57:01+00:00

I am using django pagination, as told in documentation: view part is : def

  • 0

I am using django pagination, as told in documentation:

view part is :

def list(request):
job_list = Job.objects.all()
paginator = Paginator(job_list, 25) # Show 25 jobs per page

page = request.GET.get('page',1)
try:
    jobs = paginator.page(page)
except PageNotAnInteger:
    # If page is not an integer, deliver first page.
    jobs = paginator.page(1)
except EmptyPage:
    # If page is out of range (e.g. 9999), deliver last page of results.
    jobs = paginator.page(paginator.num_pages)

return render_to_response('jobs/list.html', {"jobs": jobs})

and template is:

<div>
  {% for job in jobs %}
{# Each "contact" is a Contact model object. #}
{{ job.title|upper }}<br />

{% endfor %}

<div class="pagination">
<span class="step-links">
    {% if contacts.has_previous %}
        <a href="?page={{ contacts.previous_page_number }}">previous</a>
    {% endif %}

    <span class="current">
        Page {{ contacts.number }} of {{ contacts.paginator.num_pages }}.
    </span>

    {% if contacts.has_next %}
        <a href="?page={{ contacts.next_page_number }}">next</a>
    {% endif %}
</span>
</div>
</div>

But it gives the error saying:

In template d:\programming\django_projects\kaasib\templates\jobs\list.html, error at line 32
Caught TypeError while rendering: 'Page' object is not iterable

I am new in django and this error seems general but very strange. Because in loop there is some other variable, not job. So please tell if anyone have any idea about it.

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:57:02+00:00Added an answer on May 27, 2026 at 12:57 pm

    The error should be clear – the variable you’ve called jobs actually contains a Page object from the paginator. Which is as it should be, as you assigned jobs to paginator.page(x). So obviously, it contains a Page.

    The documentation shows what to do:

    {% for job in jobs.object_list %}
    

    etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using django-pagination to paginate the a list of objects in my temlate.
Using django-multilingual and localeurl. Small sample of my main page view: def main(request): #View
I am using django-pagination to paginate my object list. It is working flawlessly. I
At the minute, I'm using Django's object_list to handle pagination. I'm happy to move
I'm using Django Paginator everywhere on my website and even wrote a special template
I am having problems using django-tagging . I try to follow the documentation but
I using Django and a generic view django.views.generic.create_update.create_object I have a model form wich
I'm using django-pagination to paginate my pages. It works great, but I would like
im using django-registration, all is fine, the confirmation email was sending in plain text,
While using django.core.paginator import ObjectPaginator, I'm getting this error: NeedIndexError: The built-in indices are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.