请稍等 ...
×

采纳答案成功!

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

xadmin 添加小组件按钮点击报错

TypeError at /xadmin/xadmin/userwidget/add/
render() got an unexpected keyword argument ‘renderer’
Request Method: GET
Request URL: http://127.0.0.1:8000/xadmin/xadmin/userwidget/add/?user=1&page_id=home&_redirect=/xadmin/
Django Version: 2.2.1
Exception Type: TypeError
Exception Value:
render() got an unexpected keyword argument ‘renderer’
Exception Location: /home/db/.conda/envs/py37_dj20/lib/python3.7/site-packages/django/forms/boundfield.py in as_widget, line 93
Python Executable: /home/db/.conda/envs/py37_dj20/bin/python
Python Version: 3.7.3
Python Path:
[’/home/db/PycharmProjects/MxOline2’,
’/opt/pycharm-2019.1/helpers/pydev’,
’/home/db/PycharmProjects/MxOline2’,
’/opt/pycharm-2019.1/helpers/pycharm_display’,
’/opt/pycharm-2019.1/helpers/third_party/thriftpy’,
’/opt/pycharm-2019.1/helpers/pydev’,
’/home/db/.PyCharm2019.1/system/cythonExtensions’,
’/home/db/.conda/envs/py37_dj20/lib/python37.zip’,
’/home/db/.conda/envs/py37_dj20/lib/python3.7’,
’/home/db/.conda/envs/py37_dj20/lib/python3.7/lib-dynload’,
’/home/db/.conda/envs/py37_dj20/lib/python3.7/site-packages’,
’/opt/pycharm-2019.1/helpers/pycharm_matplotlib_backend’,
’/home/db/.conda/envs/py37_dj20/lib/python3.7/site-packages/odf’,
’/home/db/.conda/envs/py37_dj20/lib/python3.7/site-packages/odf’,
’/home/db/.conda/envs/py37_dj20/lib/python3.7/site-packages/odf’,
’/home/db/.conda/envs/py37_dj20/lib/python3.7/site-packages/odf’,
’/home/db/.conda/envs/py37_dj20/lib/python3.7/site-packages/odf’,
’/home/db/.conda/envs/py37_dj20/lib/python3.7/site-packages/odf’,
’/home/db/.conda/envs/py37_dj20/lib/python3.7/site-packages/odf’]
Server time: 星期三, 3 七月 2019 13:59:03 +0800

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

1回答

bobby 2019-07-04 17:51:04

https://blog.csdn.net/qq_38276669/article/details/86748232 你看看这个 你的xadmin的源码是课程中提供的吗 你的django的版本是多少?

0 回复 有任何疑惑可以回复我~
  • 老师,我的也是这个报错,django版本2.2 ,xadmin也是您提供的
    回复 有任何疑惑可以回复我~ 2019-08-11 09:54:29
  • https://git.imooc.com/coding-368/resources/_edit/master/MxOnline/xadmin/views/dashboard.py 你拷贝这个xadmin中的源文件内容 拷贝到你本地的这个文件中覆盖一下再试试
    回复 有任何疑惑可以回复我~ 2019-08-13 14:03:04
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信