[Answer]-Django post returning token not post data

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>
👤dhana

Leave a comment