how to modify action form? Django

0

I have this form in a template:

<form method='POST' action='{% url "proceso-compra" object.slug %}'>
                {% csrf_token %}
                <span>TALLA </span>
                <select name="talla" id='id_talla'>
                  {% for s in stock %}
                     {% if s.cantidad != 0 %}
                        <option value="{{s.id}}"> {{s.talla}} (uds. {{s.cantidad}})</option>
                     {% endif %}
                 {% endfor %}
                </select>
    <button class="btn-lo-quiero"> LO QUIERO</button>
</form>

My problem is that I want to modify the action of this form according to the option that I select and I do not know exactly how I can do it.

    
asked by F Delgado 30.04.2018 в 10:42
source

0 answers