{% extends 'base/layout.html' %} {% comment %} Blocks: form: Content within the
element buttons: Form submission buttons Context: object: Python instance of the object being edited form: The edit form return_url: The URL to which the user is redirected after submitting the form {% endcomment %} {% block title %} {% if object.pk %}Editing {{ object|meta:"verbose_name" }} {{ object }}{% else %}Add a new {{ object|meta:"verbose_name" }}{% endif %} {% endblock title %} {% block tabs %} {% endblock tabs %} {% block content-wrapper %}
{# Warn about missing prerequisite objects #} {% if prerequisite_model %} {% include 'inc/missing_prerequisites.html' %} {% endif %} {# Link to model documentation #} {% if settings.DOCS_ROOT and object.docs_url %} {% endif %} {% csrf_token %}
{% block form %} {% include 'htmx/form.html' %} {% endblock form %}
{% block buttons %} {% if object.pk %} {% else %} {% endif %} Cancel {% endblock buttons %}
{% endblock content-wrapper %} {% block modals %} {% include 'inc/htmx_modal.html' with size='lg' %} {% endblock %}