我运行以下教程Django Tutorial for Beginners - 2 - Creating a Project
当我从urls.py
运行代码时from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^', include('music.urls')),
]
即使是http://localhost:8000/,我也会显示音乐页面 当我删除该行
url(r'^', include('music.urls')),
我的music.py文件
from django.conf.urls import url
from music import views
urlpatterns = [
url(r'^', views.index, name="index"),
]
然后按预期进入主页
为什么会这样?它不应该走到第一线吗? 我运行django版本1.10.5
由于