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

来源:8-2 更加强大的后台管理系统-xadmin的配置

系统崩溃

2019-07-03

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

写回答

1回答

bobby

2019-07-04

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

0
2
bobby
回复
慕粉18343463557
https://git.imooc.com/coding-368/resources/_edit/master/MxOnline/xadmin/views/dashboard.py 你拷贝这个xadmin中的源文件内容 拷贝到你本地的这个文件中覆盖一下再试试
2019-08-13
共2条回复

Django+ xadmin 开发在线教育网站

一套通用的技术组合拳,助你解决大部分Python类网站后端问题

1911 学习 · 2149 问题

查看课程