报错啊
来源: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-packagesminsites.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 我这里提供的源码
022019-04-11
相似问题
回答 1
回答 1