课程6-8关于用户注册时验证码的问题
来源:6-8 用户注册-2
慕无忌6658394
2018-04-12
Internal Server Error: /register/
Traceback (most recent call last):
File "C:\Users\wb.panzhaoliang\Envs\mxonline\lib\site-packages\django\core\handlers\exception.py", line 41, in inner
response = get_response(request)
File "C:\Users\wb.panzhaoliang\Envs\mxonline\lib\site-packages\django\core\handlers\base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\Users\wb.panzhaoliang\Envs\mxonline\lib\site-packages\django\core\handlers\base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\wb.panzhaoliang\Envs\mxonline\lib\site-packages\django\views\generic\base.py", line 68, in view
return self.dispatch(request, *args, **kwargs)
File "C:\Users\wb.panzhaoliang\Envs\mxonline\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
return handler(request, *args, **kwargs)
File "E:\MyProject\MxOline\apps\users\views.py", line 27, in get
return render(request, "register.html", {'register_form': register_form})
File "C:\Users\wb.panzhaoliang\Envs\mxonline\lib\site-packages\django\shortcuts.py", line 30, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "C:\Users\wb.panzhaoliang\Envs\mxonline\lib\site-packages\django\template\loader.py", line 68, in render_to_string
return template.render(context, request)
File "C:\Users\wb.panzhaoliang\Envs\mxonline\lib\site-packages\django\template\backends\django.py", line 66, in render
return self.template.render(context)
File "C:\Users\wb.panzhaoliang\Envs\mxonline\lib\site-packages\django\template\base.py", line 207, in render
return self._render(context)
File "C:\Users\wb.panzhaoliang\Envs\mxonline\lib\site-packages\django\template\base.py", line 199, in _render
return self.nodelist.render(context)
File "C:\Users\wb.panzhaoliang\Envs\mxonline\lib\site-packages\django\template\base.py", line 990, in render
bit = node.render_annotated(context
在按照课程视频进行操作的时候出现了以下的报错,然后进行官方文档的查询,在django1.11版本里面,查询到build_attrs类已经修改成了2个参数的形式,按照老师的视频步骤来进行操作的话,会传递到三个参数到这个类里面,从而导致报错,目前不知道如何修改,希望老师解答,谢谢老师
1回答
-
慕无忌6658394
提问者
2018-04-12
问题已经解决,因为前面又老师录播的视频进行django版本的更换,但是6-8说明的是需要用0.4.6版本的captcha,解决办法是同步更新最新版本的captcha
012018-04-16
相似问题