1👍
You need to put the name
attribute on the select
element, not the option
.
But you should probably be using Django’s forms framework, anyway.
0👍
As @Daniel told that, You need to add name field to select tag not for option tag,
<select name='customer_id'>
{% for item in customer %}
<option value={{ item.customer_id }} >{{ item.customer_name }}</option>
{% endfor %}
<input type = 'submit' value='Edit'>
</select>
- [Answer]-How to tell a Django view who called it?
- [Answer]-Django – default value migration – will this touch database?
Source:stackexchange.com