djangoでdelete()関数が機能しない、
def delete_hardware (request):
notice = ''
inventory = get_object_or_404(inventory, id = request.GET.get('id'))
if inventory:
inventory.delete()
notice = "Hardware was deleted"
return render_to_response('form.html', {'notice': notice},
context_instance=RequestContext(request))
...そして、これらはform.htmlの私のコードです
<td bgcolor='#f1f1f1'><a onclick="javascript:confirmDelete('/delete/?id={{id}}')">
<img src='{{ MEDIA_URL }}/images/delete.png' width=25 height=25 />
</a></td>