0

1.3.1バージョンで実行されているdjangoコードがあり、最近djangoに更新し、関数など1.6.1のほとんどのエラーをクリアし、サイトを実行できるようになりました。direct_to_templatesettings

{% autopaginate object_list 20 %}しかし、一部のページでは、テンプレートでタグに遭遇すると以下のエラーが発生します

django-pagination(1.0.7)ページネーション機能に使用しています

Request Method: GET
Request URL:    http://localhost:8000/reports/safety/
Django Version: 1.6.1
Exception Type: KeyError
Exception Value:    
'request'
Exception Location: /home/user/.virtualenvs/proj/local/lib/python2.7/site-packages/django/template/context.py in __getitem__, line 56
Python Executable:  /home/user/.virtualenvs/proj/bin/python
Python Version: 2.7.4
......
........


Error during template rendering

In template /home/user/users/apps/proj/templates/shared/report.html, error at line 41

request

40 <tbody>
41          {% autopaginate object_list 20 %}
42          {% for report in object_list %}
43               {{report}}
44               ........
               .........
          {% endfor %}
100 </tbody>

上記のエラーが発生する理由とそれをクリアする方法を教えてください。

4

1 に答える 1