Template:
<form method="POST" action="/customer/delete/">
<div style="float: right;
margin: 0px; padding: 05px; ">
Name:<select name="customer">
{% for customer in customer %}
<option value="{{ customer.name|escape }}" ></option><br />
{% endfor %}
</select>
<input type=submit value="delete">
</div>
</form>
Views:
def delete(request, name):
Customer.objects.get(name=name).delete()
return HttpResponse('deleted')
Urls.py
(r'^customer/delete/', 'quote.excel.views.delete'),
This isnt working,plz correct the code.