请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

点击发表文章时一直报这个

TypeError at /articles/write-new-article/
init() got an unexpected keyword argument ‘instance’
Request Method: GET
Request URL: http://106.12.72.181:8000/articles/write-new-article/
Django Version: 2.1.7
Exception Type: TypeError
Exception Value:
init() got an unexpected keyword argument ‘instance’
Exception Location: /root/.local/share/virtualenvs/dev-zanhu-8G1gZrYC/lib/python3.7/site-packages/django/views/generic/edit.py in get_form, line 33
Python Executable: /root/.local/share/virtualenvs/dev-zanhu-8G1gZrYC/bin/python
Python Version: 3.7.6
Python Path:
[’/root/dev-zanhu/zanhu’,
’/root/dev-zanhu/zanhu’,
’/root/dev-zanhu/zanhu/zanhu’,
’/root/.pycharm_helpers/pycharm_display’,
’/usr/local/python/lib/python37.zip’,
’/usr/local/python/lib/python3.7’,
’/usr/local/python/lib/python3.7/lib-dynload’,
’/root/.local/share/virtualenvs/dev-zanhu-8G1gZrYC/lib/python3.7/site-packages’,
’/root/.pycharm_helpers/pycharm_matplotlib_backend’,
’/root/dev-zanhu/zanhu/zanhu’,
’/root/dev-zanhu/zanhu’,
’/root/dev-zanhu/zanhu/zanhu’]
Server time: 星期三, 4 三月 2020 17:52:31 +0800

正在回答 回答被采纳积分+3

1回答

Jack 2020-03-06 21:26:32

init() got an unexpected keyword argument ‘instance’

能否把发表文章部分的代码截图一下, views.py里的

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信