{% extends "base.html" %}

{% block content %}
<article class="chart">
    <header class="chart__heading">
        <h1>Update chart</h1>
        <p>
            <a class="action-button destroy" href="{% url 'chart-delete' chart.pk %}">Delete</a>
        </p>
    </header>
    <section>
        <form method="POST" action="{% url 'chart-update' chart.pk %}">
            {% csrf_token %}
            {{form.as_p}}
            <p class="form__submit">
                <input class="action-button" type="submit" value="Save changes"> or <a href="{% url 'chart-detail' chart.pk %}">cancel</a>
            </p>
        </form>
    </section>
</article>  
{% endblock %}