django篇-路由系统介绍
路由分为两种静态路由和动态路由
path(‘admin/‘, admin.site.urls),path(‘test/‘, views.test_view),path(‘login/‘, views.login_view),# re_path(r‘^articles/2003/$‘, views.special_case_2003),# re_path(r‘^articles/(?P<year>[0-9]{4})/$‘, views.article_archive),#re_path(r‘^articles/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/$‘, views.article_archive)# re_path(r‘^articles/([0-9]{4})/([0-9]{2})/$‘, views.article_archive2)re_path(r‘^articles/(?P<arg1>[0-9]{4})/(?P<arg2>[0-9]{2})/(?P<ddd>[\w-]+)/$‘, views.article_archive3)Django的路由匹配心法自定义路由converter管理多个URL文件省略重复的URL
相关推荐
tuxlcsdn 2020-06-21
wangxuekuan 2020-11-24
xuedabao 2020-11-19
hjr 2020-10-21
sjun0 2020-11-12
bestallen 2020-08-17
80143853 2020-08-17
Tplinkly 2020-08-15
dingyahui 2020-08-12
JiangMengYa 2020-07-30
BingGoGo技术 2020-07-25
前端小白 2020-07-19
JudeJoo 2020-07-14
bowean 2020-07-05
82344699 2020-07-05
85423468 2020-06-26
独行者0 2020-06-20