django中的管理员面板无法正常工作

时间:2022-03-12 20:07:59

I have this miniblog, I run " manage.py runserver " in cmd, and run " http://127.0.0.1:8000/ " in browser its open my Home/index page,

我有这个迷你日志,我在cmd中运行“manage.py runserver”,并在浏览器中运行“http://127.0.0.1:8000/”打开我的主页/索引页面,

but the problem is when "http://127.0.0.1:8000/admin" it won't redirect, is the problem with URL.py ? Thank you for your time, AC

但问题是当“http://127.0.0.1:8000/admin”它不会重定向时,是否有URL.py的问题?谢谢你的时间,AC

1 个解决方案

#1


0  

In you project/url.py, make sure you have this :

在项目/ url.py中,请确保您拥有:

from django.contrib import admin

urlpatterns = [
    url(r'^admin/', admin.site.urls),
]

#1


0  

In you project/url.py, make sure you have this :

在项目/ url.py中,请确保您拥有:

from django.contrib import admin

urlpatterns = [
    url(r'^admin/', admin.site.urls),
]