慕粉3944158
2020-12-19 22:51
__init__() takes 1 positional argument but 2 were given
Request Method: | GET |
---|---|
Request URL: | http://127.0.0.1:8000/bolg/hello_world |
Django Version: | 2.0 |
Exception Type: | TypeError |
Exception Value: | __init__() takes 1 positional argument but 2 were given |
Exception Location: | /Users/sadocument/django_project/django_introduction/bolg/views.py in hello_world, line 9 |
Python Executable: | /Users/sadocument/opt/anaconda3/bin/python |
Python Version: | 3.7.6 |
Python Path: | ['/Users/sadocument/django_project/django_introduction', '/Users/sadocument/opt/anaconda3/lib/python37.zip', '/Users/sadocument/opt/anaconda3/lib/python3.7', '/Users/sadocument/opt/anaconda3/lib/python3.7/lib-dynload', '/Users/sadocument/opt/anaconda3/lib/python3.7/site-packages', '/Users/sadocument/opt/anaconda3/lib/python3.7/site-packages/aeosa'] |
这个文件bolg/views.py代码贴出来,报错提示第九行。错误提示,方法接收一个参数,但是你传了两个参数。
三小时带你入门Django框架 新版上架
25629 学习 · 248 问题
相似问题