{# CSRF Error Page Template #} {# This template uses Django's templating engine and is only rendered in the user's browser if DEBUG=True #} {% extends "base_response.html" %} {% block title %}CSRF Middleware Error{% endblock title %} {% block nav_links %} {% endblock nav_links %} {% block main %}
Duck does not trust this site: {{ request.build_absolute_uri('/') }}
{% if reason %}Reason: {{ reason }}.
{% endif %}Duck implements CSRF tokens to enhance security, ensuring that your browser is protected from unauthorized third-party access and preventing potential hijacking attempts.
It looks like you may have forgotten to include a CSRF token in your form. Please ensure you’ve added one of the following:
{% csrf_token %} — for Django templates.{{ csrf_token() }} — for Jinja2 templates.CSRFInput component from duck.html.components.input module.
The csrf_token function is available at duck.shortcuts.csrf_token.
To bypass the need for a CSRF token from cookies, you can instead send the
X-Csrf-Token header.
This approach is especially useful when making AJAX requests.
You are seeing this page because DEBUG=True in your Duck settings.
To see a standard error page instead, set DEBUG=False.