<form
  id="flat-form"
  hx-post="{{ form.post_url }}"
  hx-target="this"
  hx-swap="outerHTML"
>
  {% csrf_token %}
  {{ form.as_p }}
  <div class="submit-row">
    <button type="submit">Update</button>
  </div>
</form>
