{% extends "_base.html" %}

{% block main %}
  <section>
    <p>
      This page shows you the django-htmx extension script error handler in action.
    </p>
  </section>
  <section>
    <p>
      <a href="https://django-htmx.readthedocs.io/en/latest/template_tags.html#django-htmx-extension-script">See more in the docs</a>.
    </p>
  </section>
  <section>
    <p>
      {% if DEBUG %}
        The error handler will work, since <code>DEBUG = True</code>.
      {% else %}
        The error handler will <strong>not</strong> work, since <strong>DEBUG = False</strong>.
      {% endif %}
    </p>
  </section>
  <section>
    <button hx-get="/error-demo/400/">
      400: Make a bad request
    </button>
  </section>
  <section>
    <button hx-get="/error-demo/403/">
      403: Try to access something forbidden
    </button>
  </section>
  <section>
    <button hx-get="/bermuda-triangle/">
      404: Try to fetch a non-existent page
    </button>
  </section>
  <section>
    <button hx-get="/error-demo/500/">
      500: Try to divide by zero
    </button>
  </section>
  <section>
    <button hx-get="/error-demo/500-custom/">
      500: Try a custom 500 view
    </button>
  </section>
{% endblock main %}
