请稍等 ...
×

采纳答案成功!

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

报错啊

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

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

1回答

bobby 2018-10-18 16:42:34

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

0 回复 有任何疑惑可以回复我~

相似问题

登录后可查看更多问答,登录/注册

问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信