From 521fd20e37de00179cfe92a5458a9baf80129c6a Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Thu, 23 Nov 2023 18:17:33 +0000 Subject: [PATCH] Remove unused fossils incompatible with Django 5 --- core/views/other.py | 6 +----- templates/frontpage.html | 27 --------------------------- templates/tasks.html | 29 ----------------------------- 3 files changed, 1 insertion(+), 61 deletions(-) diff --git a/core/views/other.py b/core/views/other.py index b3cbaf3..200b57b 100644 --- a/core/views/other.py +++ b/core/views/other.py @@ -92,17 +92,13 @@ def troggle404(request): # cannot get this to work. Handler404 in urls.py not r def frontpage(request): """never seen in common practice. Logon should redirect here when this is more useful""" - # the messages system does a popup on this page if there is a recent message, e.g. from the admin site actions. - # via django.contrib.messages.middleware.MessageMiddleware - # this is set in the templates. + if request.user.is_authenticated: - from django.contrib.admin.templatetags import log return render(request, "tasks.html") expeditions = Expedition.objects.order_by("-year") logbookentry = LogbookEntry cave = Cave - from django.contrib.admin.templatetags import log return render(request, "frontpage.html", locals()) diff --git a/templates/frontpage.html b/templates/frontpage.html index 866798a..e2ff96b 100644 --- a/templates/frontpage.html +++ b/templates/frontpage.html @@ -4,33 +4,6 @@ {% block title %}Cambridge Expeditions to Austria{% endblock %} - {% block related %} -

Recent Actions - admin user

- {% load log %} - {% get_admin_log 10 as admin_log for_user 1 %} - {% if not admin_log %} -

No recent actions

- {% else %} - - {% endif %} - {% endblock %} - {% block content %} diff --git a/templates/tasks.html b/templates/tasks.html index f4f4001..3a6647c 100644 --- a/templates/tasks.html +++ b/templates/tasks.html @@ -4,35 +4,6 @@ {% block title %}Cambridge Expeditions to Austria{% endblock %} - {% block related %} - - {% endblock %} - {% block content %}