django1.9使用django-pageination出现AttributeError错误处理

问题:

在django1.9使用django-pageination出现错误python

AttributeError: 'WSGIRequest' object has no attribute 'REQUEST'

缘由:

HttpRequest.REQUEST在django1.7中被弃用并使用更明确的HttpRequest.GETHttpRequest.POST来替代,而在django1.9中HttpRequest.REQUEST被移除了。git

处理:

打开python安装目录下的dist-packages/pagination/middleware.pygithub


django

return int(self.REQUEST['page'])

修改为spa

 return int(self.POST['page'])


本文:http://my.oschina.net/soarwilldo/blog/626872.net

参考:
code

Use the more explicit GET and POST insteadblog

https://github.com/tschellenbach/Django-facebook/pull/564
ci

相关文章
相关标签/搜索