From 95447ab3e7626444e9fa649d717f4156b6529183 Mon Sep 17 00:00:00 2001 From: Carl Karsten Date: Wed, 17 Jan 2024 22:25:01 -0600 Subject: [PATCH] migrate view-on-site to use new urls.reverse --- dj/main/models.py | 5 +++-- dj/main/views.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dj/main/models.py b/dj/main/models.py index a27be9e3..a67454cc 100644 --- a/dj/main/models.py +++ b/dj/main/models.py @@ -218,9 +218,10 @@ def get_minutes(self): def __str__(self): return self.filename - # @models.permalink def get_absolute_url(self): - return ('raw_file', [self.id,]) + return urls.reverse('raw_file', kwargs={"raw_file_id": self.id}) + # return reverse("people-detail", kwargs={"pk": self.pk}) + # return ('raw_file', [self.id,]) class Meta: ordering = ["start", "location", "filename"] diff --git a/dj/main/views.py b/dj/main/views.py index 782ee568..12097e7d 100644 --- a/dj/main/views.py +++ b/dj/main/views.py @@ -58,7 +58,7 @@ from .unique_slugify import fnify -from lib import richard +# from lib import richard def main(request):