sangdongvan / django-pagination

Automatically exported from code.google.com/p/django-pagination due to issue syntax errors when running python3
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

'WSGIRequest' object has no attribute 'page' #69

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I followed every step of the tutorial, i added pagination to INSTALLED_APPS,
django.core.context_processors.request, to TEMPLATE_CONTEXT_PROCESSORS, but 
when i added the autopaginate tag in my template ig got the following error:

Caught AttributeError while rendering: 'WSGIRequest' object has no attribute 
'page'

My template looks something like (i have to paginate the queryset named 'jobs'):
{% block content %}
    {% autopaginate jobs %}
    {% if jobs %}
    ... HTML for the table ...
      {% for J in jobs %}
      ... more HTML  ...
      {% endfor %}
    </table>
    ... even more HTML ...
    {% else %}
    <p>No current jobs.</p>
    {% endif %}
{% endblock %}

Any idea why this error might occur or what am i getting wrong? any help would 
be great.

Original issue reported on code.google.com by stefan.o...@gmail.com on 13 Jul 2010 at 8:17

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I had this problem, but it seems to have gone away upon resetting the server. 
Also, did you add the middleware?

Original comment by kont...@monikasulik.net on 14 Jul 2010 at 11:02

GoogleCodeExporter commented 8 years ago
Hi guys,  have you got the pagination Middleware installed? Add the following 
to the list of Middlewares in your settings.py

'pagination.middleware.PaginationMiddleware',

Original comment by asi...@gmail.com on 26 Jul 2010 at 5:21

GoogleCodeExporter commented 8 years ago
My problem was that I didn't reset the development server after adding the 
middleware :)

Original comment by kont...@monikasulik.net on 26 Jul 2010 at 5:43

GoogleCodeExporter commented 8 years ago
I got same error in server, it doesnt appear on the screen but in the apache 
log file

ImproperlyConfigured: Error importing middleware pagination.middleware: "No 
module named pagination.middleware"

Original comment by Rehmetjan.Tursun on 15 Feb 2012 at 9:07