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
<tr>
<td style="word-wrap:break-word" width="5%" align="center" >{{ name.id }}</td>
<td style="word-wrap:break-word" width="5%" align="center" >{{ name.name }}</td>
<td style="word-wrap:break-word" width="5%" align="center" >{{ name.author }}</td>
<td style="word-wrap:break-word" width="5%" align="center" >{{ name.serialstatus }}</td>
<td style="word-wrap:break-word" width="5%" align="center" >{{ name.category }}</td>
<td style="word-wrap:break-word" width="40%" align="center" >{{ name.introduction }}</td>
<td style="word-wrap:break-word" width="40%" align="center" >
<p><a href="/edit/{{name.id}}" >Edit</a></p>
<p><a href="/del/{{name.id}}">Del</a> </p>
<p> <a href="/add/{{name.id}}">Add</a> </p>
</td>
</tr>
urls.py
url(r'^del/(?P<id>\d+)/$',ve.Del_table,name='del')
访问 http://127.0.0.1:8888/del/316/ 页面返回 none
id以参数的方式传入了,不需要再通过request.GET.get的方式获取,直接用id这个变量