Django映射URL出错

问题遇到的现象和发生背景

Djangoty入门,建立虚拟环境、激活、安装django、创建项目、创建数据库都正常,但是在映射URL处出错。

问题相关代码,请勿粘贴截图

learning_log中urls:
from django.contrib import admin
from django.urls import path,include
urlpatterns = [
path('admin/', admin.site.urls),
path('',include('learning_logs.urls',namespace='learning_logs')),
]

#定义learning_logs的URL模式
from django.urls import path
from . import views
urlpatterns=[
#主页
path('',views.index,name='index'),
]

from django.shortcuts import render

Create your views here.

def index(request):
#学习笔记的主页
return render(request,'learning_logs/index.html')

运行结果及报错内容

http://127.0.0.1:8000/admin/页面无法显示

我想要达到的结果

可以正常显示网页


from django.urls import path, re_path
rlpatterns = [
    path('articles/2003/', views.special_case_2003),
    re_path(r'^articles/(?P<year>[0-9]{4})/$', views.year_archive),
    re_path(r'^articles/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/$', views.month_archive),
    re_path(r'^articles/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<slug>[\w-]+)/$', views.article_detail),
]
 
rom django.urls import path
 
from . import views
 
urlpatterns = [
    path('articles/2003/', views.special_case_2003),
    path('articles/<int:year>/', views.year_archive),
    path('articles/<int:year>/<int:month>/', views.month_archive),
    path('articles/<int:year>/<int:month>/<slug:slug>/', views.article_detail),
]
看你是哪种