{% extends 'base/layout.html' %} {% load i18n %} {% 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 %}{% blocktrans %}Editing {{ object|meta:"verbose_name" }} {{ object }}{% endblocktrans %}{% else %}{% blocktrans %}Add a new {{ object|meta:"verbose_name" }}{% endblocktrans %}{% 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 %} {% trans "Cancel" %} {% endblock buttons %}
{% endblock content-wrapper %} {% block modals %} {% include 'inc/htmx_modal.html' with size='lg' %} {% endblock %}