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 530633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:13:03+00:00 2026-05-13T09:13:03+00:00

This is in my urls.py: group_info = { ‘queryset’: Group.objects.all(), ‘template_object_name’: ‘groups’, ‘paginate_by’: 25,

  • 0

This is in my urls.py:

group_info = {
    'queryset': Group.objects.all(),
    'template_object_name': 'groups',
    'paginate_by': 25,
}

And this is the relevant URL:
(r’^groups/$’, ‘django.views.generic.list_detail.object_list’, group_info),

And this is my code in the template:

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

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

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

.. but no pagination information is displayed. I think I am doing this exactly as done in the documentation. Any idea what is wrong?

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-13T09:13:03+00:00Added an answer on May 13, 2026 at 9:13 am

    You’re using the wrong variable names. As the docs say, the variable names are paginator for the paginator object and page_obj for the page.

    {% if is_paginated %}
        <div class="pagination">
            <span class="step-links">
                {% if page_obj.has_previous %}
                    <a href="?page={{ page_obj.previous_page_number }}">previous</a>
                {% endif %}
    
                <span class="current">
                    Page {{ page_obj.number }} of {{ paginator.num_pages }}.
                </span>
    
                {% if page_obj.has_next %}
                    <a href="?page={{ page_obj.next_page_number }}">next</a>
                {% endif %}
            </span>
        </div>
    {% endif %}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm still working with this huge list of URLs, all the help I have
I have a site with URLs like this: http://domain.co.uk/subdir/page.php I have redesigned the site
In regards to this: http://stackoverflow.uservoice.com/pages/general/suggestions/103227-parser-does-not-match-all-valid-urls is this regex adequate or will it need to
I was reading this question about how to parse URLs out of web pages
I wish to store URLs in a database (MySQL in this case) and process
I rewrite URLs to include the title of user generated travelblogs. I do this
I'm having trouble with redirecting urls using the .htaccess file. This is what my
I see many, many sites that have URLs for individual pages such as http://www.mysite.com/articles/this-is-article-1
I want to cut all url's like ( http://... .) and replace them on
I have a table filled with URLs. The URLs are in all sorts of

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.