From 1e082dcb25e9804ffae0521219434234ad9d076c Mon Sep 17 00:00:00 2001 From: reverend Date: Wed, 12 Aug 2020 18:51:57 +0200 Subject: [PATCH 1/3] Amind site link --- lostplaces/lostplaces_app/templates/global.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lostplaces/lostplaces_app/templates/global.html b/lostplaces/lostplaces_app/templates/global.html index 41ea0a7..9c8dcf6 100644 --- a/lostplaces/lostplaces_app/templates/global.html +++ b/lostplaces/lostplaces_app/templates/global.html @@ -22,7 +22,11 @@ {% if user.is_authenticated %} Hi {{ user.username }}! - logout + logout + {% if user.is_superuser %} + | admin + {% endif %} + {% else %} You are not logged in. login | From 0074c7356280b6912930f689aff75dc117091c26 Mon Sep 17 00:00:00 2001 From: reverend Date: Wed, 12 Aug 2020 18:52:04 +0200 Subject: [PATCH 2/3] Custom 403 --- lostplaces/templates/403.html | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 lostplaces/templates/403.html diff --git a/lostplaces/templates/403.html b/lostplaces/templates/403.html new file mode 100644 index 0000000..6b0bd7d --- /dev/null +++ b/lostplaces/templates/403.html @@ -0,0 +1,2 @@ +{% extends 'global.html'%} +{% block title %}Forbidden{% endblock %} From 10d96c7c8fba9486afae219190b66efb8061b2ae Mon Sep 17 00:00:00 2001 From: reverend Date: Wed, 12 Aug 2020 18:56:09 +0200 Subject: [PATCH 3/3] Using referrer in 403 --- lostplaces/templates/403.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lostplaces/templates/403.html b/lostplaces/templates/403.html index 6b0bd7d..29954f0 100644 --- a/lostplaces/templates/403.html +++ b/lostplaces/templates/403.html @@ -1,2 +1,9 @@ {% extends 'global.html'%} + {% block title %}Forbidden{% endblock %} + +{% block maincontent %} +{% if request.META.HTTP_REFERER %} +

Go Back

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