title: In Django-pagination Paginate does not working
body: <ul>
  <li>Python 2.6.2
  
  <ul>
  <li><a href="http://code.google.com/p/django-pagination/source/checkout" rel="nofollow noreferrer">django-pagination</a> 1.0.5</li>
  </ul></li>
  </ul>
  
  <p><strong>Question</strong>: How to force pagination work correctly? The problem is that <code>{% paginate %}</code> does not work, but other <code>{% load pagination_tags %}</code> and <code>{% autopaginate object_list 10 %}</code> works!</p>
  
  <p>Error message appeared, when I add <code>{% paginate %}</code> into html page:</p>
  
  <pre><code>TemplateSyntaxError at /logging
  Caught an exception while rendering: pagination/pagination.html
  </code></pre>
  
  <p>What I have done:</p>
  
  <ol>
  <li><p>Install django-pagination without any problems. When I do in python <code>import pagination</code>, it's work well.</p></li>
  <li><p>Added pagination to INSTALLED_APP in settings.py:</p>
  
  <p>INSTALLED_APPS = (
      # ...,
      'pagination',
  )</p></li>
  <li><p>Added in settings.py:</p>
  
  <p>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"
  )</p></li>
  <li><p>Also add to settings.py middleware:</p>
  
  <p>MIDDLEWARE_CLASSES = (
             # ...
             'pagination.middleware.PaginationMiddleware',
         )</p></li>
  <li><p>Add to top in views.py:</p>
  
  <p>from django.template import RequestContext</p></li>
  <li><p>And finally add to my HTML template page lines:</p>
  
  <p>{% load pagination_tags %}
  ...
  {% autopaginate item_list 50 %}
  {% for item in item_list %}
  ...
  {% endfor %}
  {% paginate %}</p></li>
  </ol>
  
  <p>Thanks.</p>
  
  <hr>
  
  <p><strong>ADDED</strong>: Top of error report:</p>
  
  <pre><code>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      &lt;td&gt;{{ item.transaction_datetime }}&lt;/td&gt;
  84      &lt;td&gt;{{ item.src_account }}&lt;/td&gt;
  85      &lt;td&gt;{{ item.dst_account }}&lt;/td&gt;
  86      &lt;td&gt;{{ item.body }}&lt;/td&gt;
  87      &lt;td&gt;{{ item.estimated }}&lt;/td&gt;
  88  &lt;!--
  89      &lt;td&gt;&lt;a href="./admin/accounting/transaction/{{item.id}}/"&gt;edit&lt;/a&gt;&lt;/td&gt;
  90  --&gt;
  91  &lt;/tr&gt;
  92  {% endfor %}
  93  {% paginate %}
  94  &lt;/table&gt;
  95  {% else %}
  96      &lt;p&gt;No transaction logs are available.&lt;/p&gt;
  97  {% endif %}
  98          &lt;/div&gt;
  99      
  100 
  101 &lt;/div&gt;
  102        
  103         &lt;br class="clear" /&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>ADDED</strong> for <em>stevejalim</em>:</p>
  
  <pre><code>@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))
  </code></pre>
  
  <p>PS: some edits required, because I can't django code style work well here :)</p>