我正在一个Django应用程序时遇到以下错误:render_to_string()得到了一个意想不到的关键字参数“状态”
TypeError at /login
render_to_string() got an unexpected keyword argument 'status'
Request Method: GET
Request URL: http://10.107.44.122:8002/login?next=/
Django Version: 1.7.1
Exception Type: TypeError
Exception Value: render_to_string() got an unexpected keyword argument 'status'
Exception Location: /usr/local/lib/python2.7/dist-packages/django/shortcuts.py in render_to_response, line 23
Python Executable: /usr/bin/python
Python Version: 2.7.6
我能想到的,其中的误差可能来自的地方是:
render_to_response('login.html', context, status=status, context_instance=RequestContext(request))
status
是应该预期render_to_response
关键字,那么为什么这个错误?
你使用的是什么版本的Django? – solarissmoke
@solarissmoke它说错误:1.7.1 – Wtower
什么是'状态'应该是无论如何? – Wtower