{% extends 'doc/en/base.html' %} {% load static %} {% block content %} {% verbatim %}

Update


{% extends 'blitz_crud_update.html' %}

{% extends extend_template %}
{% block content %}
<div class="container">
    {% if context.title %}<h1>{{context.title}}</h1>{% endif %}
    <form method="POST">
        <input type="hidden" name="_method" value="PUT">
        {% csrf_token %}
        {{ formset.management_form }}
        {% for form in formset %}
            <div class="card" style="margin-bottom: 7px;">
                <div class="card-body">
                    {{form.as_p}}
                </div>
            </div>
        {% endfor %}
        <div class="float-right" style="padding-bottom: 10px;">
            <button type="submit" class="btn btn-warning"><i class="fas fa-edit"></i> {{crud_button.update}}</button>
            <a role="button" href="{% url crud_url.view %}" type="button" class="btn btn-secondary"><i class="fas fa-times"></i> {{crud_button.cancel}}</a>
        </div>
    </form>
</div>
{% endblock %}
Important highlight in the hidden field on the form.

<input type="hidden" name="_method" value="PUT">

Blitz Work offers full support to methods (Get, Post, Put and Delete) of HTTP, but HTML Forms only support the methods (Get and Post), For the PUT and Delete methods, it is necessary to include this field in the forms of Edition and elimination.

{% endverbatim %} {% endblock content %}