报错啊

来源:5-2 xadmin的安装

慕运维7086580

2018-10-16

1.输入http://127.0.0.1:8000/
报错:
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/
Using the URLconf defined in MxOnline.urls, Django tried these URL patterns, in this order:
^xadmin/
The empty path didn’t match any of these.

============================================================

2.输入http://127.0.0.1:8000/xadmin
报错:
AttributeError at /xadmin/
‘WSGIRequest’ object has no attribute 'user’
Request Method: GET
Request URL: http://127.0.0.1:8000/xadmin/
Django Version: 2.1.2
Exception Type: AttributeError
Exception Value:
‘WSGIRequest’ object has no attribute 'user’
Exception Location: C:UsersHSEnvsmkonlinelibsite-packages­minsites.py in has_permission, line 161
Python Executable: C:UsersHSEnvsmkonlineScriptspython.exe
Python Version: 3.6.5
Python Path:
[‘F:MxOnlineapps’,
‘F:MxOnline’,
‘F:MxOnline’,
‘F:MxOnlineapps’,
‘C:UsersHSEnvsmkonlineScriptspython36.zip’,
‘C:UsersHSEnvsmkonlineDLLs’,
‘C:UsersHSEnvsmkonlinelib’,
‘C:UsersHSEnvsmkonlineScripts’,
‘C:Program FilesPython36Lib’,
‘C:Program FilesPython36DLLs’,
‘C:UsersHSEnvsmkonline’,
‘C:UsersHSEnvsmkonlinelibsite-packages’,
'C:Program FilesJetBrainsPyCharm '
‘2018.1.4helperspycharm_matplotlib_backend’,
‘C:UsersHSEnvsmkonlinelibsite-packagesodf’,
‘C:UsersHSEnvsmkonlinelibsite-packagesodf’,
‘C:UsersHSEnvsmkonlinelibsite-packagesodf’,
‘C:UsersHSEnvsmkonlinelibsite-packagesodf’,
‘C:UsersHSEnvsmkonlinelibsite-packagesodf’,
‘C:UsersHSEnvsmkonlinelibsite-packagesodf’,
‘C:UsersHSEnvsmkonlinelibsite-packagesodf’]
Server time: 星期二, 16 十月 2018 23:31:32 +0800

写回答

1回答

bobby

2018-10-18

django不要使用django2.1 可以使用django2.0 xadmin的源码使用 https://git.imooc.com/coding-78/coding-78/src/py3.6_django2.0/MxOnlie/extra_apps 我这里提供的源码

0
2
bobby
回复
weibo_奥特斯东_0
xadmin支持django2.1会有问题 先不要使用django2.1
2019-04-11
共2条回复

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

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

3677 学习 · 4038 问题

查看课程