APP下的urls配置
from django.urls import path
from Study_1 import views
urlpatterns = [
path('index/', views.index, name='index'),
]
项目下的urls配置
from django.contrib import admin
from django.urls import path
from django.conf.urls import include
urlpatterns = [
path('Study_1/',include('Study_1.urls')),
path('admin/', admin.site.urls),
]
运行网页后依旧报出
Using the URLconf defined in djangoProject.urls, Django tried these URL patterns, in this order:
Study_1/
admin/
The empty path didn’t match any of these.