From 12a991920a802205e1ad33fa414ed89c1a7375e3 Mon Sep 17 00:00:00 2001 From: Sam Wenham Date: Mon, 25 Feb 2019 23:07:20 +0000 Subject: [PATCH] Get get_absolute_url in the correct place --- core/views_logbooks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/views_logbooks.py b/core/views_logbooks.py index c6f9086..5ecb792 100644 --- a/core/views_logbooks.py +++ b/core/views_logbooks.py @@ -80,6 +80,9 @@ def expedition(request, expeditionname): message = LoadLogbookForExpedition(expedition) return render_with_context(request,'expedition.html', {'expedition': expedition, 'expeditions':expeditions, 'personexpeditiondays':personexpeditiondays, 'message':message, 'settings':settings, 'dateditems': dateditems }) + def get_absolute_url(self): + return ('expedition', (expedition.year)) + class ExpeditionListView(ListView): model = Expedition @@ -89,9 +92,6 @@ class ExpeditionListView(ListView): context['now'] = timezone.now() return context -def get_absolute_url(self): - return ('expedition', (expedition.year)) - def person(request, first_name='', last_name='', ): this_person = Person.objects.get(first_name = first_name, last_name = last_name)