views.py
def Del_table(request,id):
if request.method == 'GET':
nid = request.GET.get('name.id')
return render(request,'del.html',{'nid':nid})
del.html
{{nid}}
table.html
{{ name.id }}
{{ name.name }}
{{ name.author }}
{{ name.serialstatus }}
{{ name.category }}
{{ name.introduction }}
urls.py
url(r'^del/(?P\d+)/$',ve.Del_table,name='del')
访问 http://127.0.0.1:8888/del/316/ 页面返回 none
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
id以参数的方式传入了,不需要再通过request.GET.get的方式获取,直接用id这个变量