Although the new version of the path replaces the previous url, but not directly write regular expressions in the route at the time of writing the route, or will not find the page.
Workaround
Use re_path
from django.urls import re_path,path urlpatterns = [ path('admin/', admin.site.urls), re_path('',views.edit), #默认首页
]