you can view full source code here dpaste.com/hold/167199
Error:
delete() takes exactly 2 arguments (1 given)
Copied from linked code:
index.html
............................................
<form method="POST" action="/customer/(?P<name>[a-z]*)/delete/">
<div style="float: right;
margin: 0px; padding: 05px; ">
<label for="id_customer">Customer:</label>
<select name="customer" id="id_customer">
<option value="" selected="selected">---------</option>
<option value="{{ customer.customer_name|escape }}"></option>
</select>
<input type="submit" value="delete">
</div>
</form>
......................................
Urls.py
(r'^customer/(?P<name>[a-z]*)/delete/', 'quote.excel.views.delete')
Views.py
def delete(request, name):
if request.method == "POST":
Customer.objects.get(name=name).delete()
This is how, i am using it.First,select should display the values presented in db into drop down box but it is rendering dd box,values are empty.
In views,i get 2 params needed only 1 given and problemwith urls.py is 404.