From 3a1e94f41cb2c94e9455a2eb247c5d7085ac5255 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Fri, 1 Jan 2021 22:40:30 -0500 Subject: [PATCH 1/3] Use exception var in 403.html if available --- .../{{cookiecutter.project_slug}}/templates/403.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html index c02bd4e9..49c82a9d 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html @@ -5,5 +5,5 @@ {% block content %}

Forbidden (403)

-

CSRF verification failed. Request aborted.

+

{% if exception %}{{ exception }}{% else %}CSRF verification failed. Request aborted.{% endif %}

{% endblock content %}{% endraw %} From ac0af4c178029adb2ab08ad94f79994233179e2c Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Fri, 1 Jan 2021 22:44:02 -0500 Subject: [PATCH 2/3] Use exception var in 404.html if available --- .../{{cookiecutter.project_slug}}/templates/404.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/404.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/404.html index 1687ef31..187c1fc9 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/404.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/404.html @@ -5,5 +5,5 @@ {% block content %}

Page not found

-

This is not the page you were looking for.

+

{% if exception %}{{ exception }}{% else %}This is not the page you were looking for.{% endif %}

{% endblock content %}{% endraw %} From 1aa4c31b87d3a32fd791ee1a7053c4d08f845200 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Mon, 22 Feb 2021 15:45:05 -0500 Subject: [PATCH 3/3] Change confusing CSRF 403 message Co-authored-by: Bruno Alla --- .../{{cookiecutter.project_slug}}/templates/403.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html index 49c82a9d..31da9882 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html @@ -5,5 +5,5 @@ {% block content %}

Forbidden (403)

-

{% if exception %}{{ exception }}{% else %}CSRF verification failed. Request aborted.{% endif %}

+

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

{% endblock content %}{% endraw %}