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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:48:36+00:00 2026-05-17T00:48:36+00:00

Python 2.6.2 django-pagination 1.0.5 Question : How to force pagination work correctly? The problem

  • 0
  • Python 2.6.2
    • django-pagination 1.0.5

Question: How to force pagination work correctly? The problem is that {% paginate %} does not work, but other {% load pagination_tags %} and {% autopaginate object_list 10 %} works!

Error message appeared, when I add {% paginate %} into html page:

TemplateSyntaxError at /logging
Caught an exception while rendering: pagination/pagination.html

What I have done:

  1. Install django-pagination without any problems. When I do in python import pagination, it’s work well.

  2. Added pagination to INSTALLED_APP in settings.py:

    INSTALLED_APPS = (
    # …,
    ‘pagination’,
    )

  3. Added in settings.py:

    TEMPLATE_CONTEXT_PROCESSORS = (
    “django.core.context_processors.auth”,
    “django.core.context_processors.debug”,
    “django.core.context_processors.i18n”,
    “django.core.context_processors.media”,
    “django.core.context_processors.request”
    )

  4. Also add to settings.py middleware:

    MIDDLEWARE_CLASSES = (
    # …
    ‘pagination.middleware.PaginationMiddleware’,
    )

  5. Add to top in views.py:

    from django.template import RequestContext

  6. And finally add to my HTML template page lines:

    {% load pagination_tags %}
    …
    {% autopaginate item_list 50 %}
    {% for item in item_list %}
    …
    {% endfor %}
    {% paginate %}

Thanks.


ADDED: Top of error report:

TemplateSyntaxError at /logging
Caught an exception while rendering: pagination/pagination.htmlRequest Method:  GET
Request URL:    http://host:8123/logging?portfolio_id=1
Exception Type: TemplateSyntaxError
Exception Value:    Caught an exception while rendering: pagination/pagination.html
Exception Location: /usr/local/lib/python2.6/dist-packages/django/template/debug.py in render_node, line 81
Python Executable:  /usr/bin/python
Python Version: 2.6.2
Python Path:    ['/home/mosg/sources/django/apm', '/usr/local/lib/python2.6/dist-packages/django_pagination-1.0.5-py2.6.egg', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages', '/var/lib/python-support/python2.6', '/var/lib/python-support/python2.6/gtk-2.0', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages']
Server time:    Thu, 17 Jun 2010 06:29:45 -0500

Template error

In template /home/mosg/sources/django/apm/templates/accounting/logging.html, error at line 93
Caught an exception while rendering: pagination/pagination.html
83      <td>{{ item.transaction_datetime }}</td>
84      <td>{{ item.src_account }}</td>
85      <td>{{ item.dst_account }}</td>
86      <td>{{ item.body }}</td>
87      <td>{{ item.estimated }}</td>
88  <!--
89      <td><a href="./admin/accounting/transaction/{{item.id}}/">edit</a></td>
90  -->
91  </tr>
92  {% endfor %}
93  {% paginate %}
94  </table>
95  {% else %}
96      <p>No transaction logs are available.</p>
97  {% endif %}
98          </div>
99      
100 
101 </div>
102        
103         <br class="clear" />

ADDED for stevejalim:

@login_required
def logging(request):
    pid = request.GET.get('portfolio_id', 1)
    item_list = TransactionsLogging.objects.filter(Q(portfolio_id=pid)).order_by('-datetime')
    return render_to_response('accounting/logging.html', {'item_list': item_list, 'user': request.user,}, context_instance = RequestContext(request))

PS: some edits required, because I can’t django code style work well here 🙂

  • 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-17T00:48:37+00:00Added an answer on May 17, 2026 at 12:48 am

    Solution was found earlier: django-pagination you need with of the latest version, which is fix the bug!

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

Sidebar

Related Questions

I have a website (python/django) that needs to use a load of Java resources
I am writing a Python/Django web application that uses OAuth (for the TwitterAPI, not
I'm tring to use django-pagination package(http://pypi.python.org/pypi/django-pagination) and I found out that in pagination template
My problem is a python/django mix. I have a form model that will display
A python/django beginner's question: I have a datetime object (drive_date), a time object (start_time)
I need to have an at-home project now that I'm working on Python/Django at
Django python problem: The select drop down returns the numeric value of the item.
Does a plugin exists for Python/Django into Dreamweaver? Just wondering since Dreamweaver is a
I am using python and django and like it a lot. But than i
I have a python/django application that runs on the google app engine. My views.py

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.