From a50f2bee949560d122008aa433e23ff5e3e9820c Mon Sep 17 00:00:00 2001 From: Imran Rahman <63735892+infraredCoding@users.noreply.github.com> Date: Mon, 24 Jul 2023 17:41:10 +0600 Subject: [PATCH] Display custom 403_csrf.html while getting a csrf error in prod (#4464) Co-authored-by: Imran Rahman --- .../templates/403_csrf.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html new file mode 100644 index 00000000..d90b33f9 --- /dev/null +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html @@ -0,0 +1,14 @@ +{% raw %}{% extends "base.html" %} + +{% block title %}Forbidden (403){% endblock title %} +{% block content %} +

Forbidden (403)

+

+ {% if exception %} + {{ exception }} + {% else %} + You're not allowed to access this page. + {% endif %} +

+{% endblock content %} +{%- endraw %}