django--url 匹配,是个惰性匹配,匹配到前部分后就不会再接着匹配

 

urlpatterns = [
path(‘‘, views.dashboard, name="sales_dashboard"),
path(‘stu_enrollment/‘, views.stu_enrollment, name="stu_enrollment"),
re_path(‘enrollment/(\d+)/fileupload/‘, views.enrollment_fileupload, name="enrollment_fileupload"), #这个url要写在上面

re_path(‘enrollment/(\d+)/‘, views.enrollment, name="enrollment"),

]

django--url 匹配,是个惰性匹配,匹配到前部分后就不会再接着匹配

上一篇:优先级设置nice值 ; 给进程发送信号kill、nohup、setsid、 screen;查看网络状态netstat;proc文件系统


下一篇:基于HttpClient封装的请求类