From 9f3ed46b35ee678dff6d3943467e3f80d6ea4b94 Mon Sep 17 00:00:00 2001 From: reverend Date: Wed, 12 Aug 2020 19:04:42 +0200 Subject: [PATCH 1/2] 403 Autoredirect --- lostplaces/lostplaces_app/templates/global.html | 5 ++++- lostplaces/templates/403.html | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lostplaces/lostplaces_app/templates/global.html b/lostplaces/lostplaces_app/templates/global.html index 9c8dcf6..a75729d 100644 --- a/lostplaces/lostplaces_app/templates/global.html +++ b/lostplaces/lostplaces_app/templates/global.html @@ -8,7 +8,10 @@ {% block title %}Urban Exploration{% endblock %} - + + + {% block additional_head %} + {% endblock additional_head %} diff --git a/lostplaces/templates/403.html b/lostplaces/templates/403.html index 29954f0..d83805a 100644 --- a/lostplaces/templates/403.html +++ b/lostplaces/templates/403.html @@ -1,6 +1,13 @@ {% extends 'global.html'%} {% block title %}Forbidden{% endblock %} +{% block additional_head %} +{% if request.META.HTTP_REFERER %} +

Go Back

+ +{% endif %} + +{% endblock additional_head %} {% block maincontent %} {% if request.META.HTTP_REFERER %} From 1d62b20a3c9ff37bdca5c554444442546f594b29 Mon Sep 17 00:00:00 2001 From: reverend Date: Wed, 12 Aug 2020 19:06:19 +0200 Subject: [PATCH 2/2] More markup --- lostplaces/templates/403.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lostplaces/templates/403.html b/lostplaces/templates/403.html index d83805a..00df838 100644 --- a/lostplaces/templates/403.html +++ b/lostplaces/templates/403.html @@ -11,6 +11,6 @@ {% block maincontent %} {% if request.META.HTTP_REFERER %} -

Go Back

+

You will be redirected in 5 seconds

Go Back

{% endif %} {% endblock maincontent %} \ No newline at end of file