简体   繁体   English

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

[英]Admin panel in django is not working

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 ? 但是问题是当“ http://127.0.0.1:8000/admin ”它不会重定向时,URL.py是否有问题? Thank you for your time, AC 谢谢您的时间,AC

In you project/url.py, make sure you have this : 在您的project / url.py中,确保您具有以下内容:

from django.contrib import admin

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM