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

Caught an exception while rendering: 'request' #46

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I have installed django-pagination1.0.5 
2. Modified settings.py accordingly to the video tutorial
3. wrote my template code 

What is the expected output? What do you see instead?
expected output - paginated results 

What version of the product are you using? On what operating system?
django-pagination1.0.5 on windows xp

Please provide any additional information below.
the error i got is :
Caught an exception while rendering: 'request'

Original Traceback (most recent call last):
  File "C:\Python25\lib\site-packages\django\template\debug.py", line 71,
in render_node
    result = node.render(context)
  File
"c:\python25\lib\site-packages\django_pagination-1.0.5-py2.5.egg\pagination\temp
latetags\pagination_tags.py",
line 90, in render
    page_obj = paginator.page(context['request'].page)
  File "C:\Python25\lib\site-packages\django\template\context.py", line 43,
in __getitem__
    raise KeyError(key)
KeyError: 'request'

Below i list my template code:

<ul>
  {%if row %} 
     {%autopaginate row 4 %}
        {% for item in row %}
            <li>{{ item }}</li>
        <br>
        {% endfor %}
     {% paginate %}
  {% endif %}
</ul>

Original issue reported on code.google.com by alina.h...@gmail.com on 9 Apr 2009 at 11:22

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
fix: http://code.google.com/p/django-pagination/issues/detail?id=20

Original comment by drter...@gmail.com on 11 Apr 2009 at 4:19