URL:
re_path('edit_teacher-(\d+).html', views.handle_edit_teacher),
HTML:
<a href='/edit_teacher-{{ nid }}'>
Views:
def handle_edit_teacher(request, nid):
pass
re_path('edit_teacher-(\d+).html', views.handle_edit_teacher),
HTML:
<a href='/edit_teacher-{{ nid }}'>
Views:
def handle_edit_teacher(request, nid):
pass
转载于:https://www.cnblogs.com/jiefangzhe/p/10778850.html