xadmin安装配置完成,登录页面后点击用户报错

来源:5-2 xadmin的安装

慕工程3462780

2019-01-18

错误提示
AttributeError at /admin/users/userprofile/
‘CharField’ object has no attribute ‘rel’

Request Method: GET
Request URL: http://127.0.0.1:8000/admin/users/userprofile/
Django Version: 2.1.5
Exception Type: AttributeError
Exception Value:
‘CharField’ object has no attribute 'rel’
Exception Location: C:\Users\Administrator\Envs\mxonline\lib\site-packages\xadmin\views\list.py in result_item, line 547
Python Executable: C:\Users\Administrator\Envs\mxonline\Scripts\python.exe
Python Version: 3.7.1
Python Path:
[‘C:\Users\Administrator\PycharmProjects\MxOnline\apps’,
‘C:\Users\Administrator\PycharmProjects\MxOnline’,
‘C:\Program Files\JetBrains\PyCharm 2018.3.2\helpers\pycharm’,
‘C:\Users\Administrator\PycharmProjects\MxOnline’,
‘C:\Users\Administrator\PycharmProjects\MxOnline\apps’,
‘C:\Users\Administrator\Envs\mxonline\Scripts\python37.zip’,
‘C:\Users\Administrator\Envs\mxonline\DLLs’,
‘C:\Users\Administrator\Envs\mxonline\lib’,
‘C:\Users\Administrator\Envs\mxonline\Scripts’,
‘c:\program files\python\python37\Lib’,
‘c:\program files\python\python37\DLLs’,
‘C:\Users\Administrator\Envs\mxonline’,
‘C:\Users\Administrator\Envs\mxonline\lib\site-packages’,
‘C:\Users\Administrator\Envs\mxonline\lib\site-packages\odf’,
‘C:\Users\Administrator\Envs\mxonline\lib\site-packages\odf’,
‘C:\Users\Administrator\Envs\mxonline\lib\site-packages\odf’,
‘C:\Users\Administrator\Envs\mxonline\lib\site-packages\odf’,
‘C:\Users\Administrator\Envs\mxonline\lib\site-packages\odf’,
‘C:\Users\Administrator\Envs\mxonline\lib\site-packages\odf’,
‘C:\Users\Administrator\Envs\mxonline\lib\site-packages\odf’]
Server time: 星期五, 18 一月 2019 13:52:28 +0800

写回答

1回答

Ethreal

2019-01-18

你的django和xadmin的版本是什么,你截图下抛出异常的区域你写的代码位置的部分,不是源码

0
1
bobby
是的,请注明一下django是哪个版本? 如果是django2.0 请到这个分支下下载一下xadmin的源码 https://git.imooc.com/coding-78/coding-78/src/py3.6_django2.0/MxOnlie/extra_apps
2019-01-20
共1条回复

Python3.6+django+xadmin,打造在线教育平台

【毕设】Python 2.7到3.6 完美适配,Django升级2.0

3677 学习 · 4038 问题

查看课程