From ced85c7b44b44305992356a78ac198c288ff0f80 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Wed, 2 Mar 2022 13:11:24 +0100 Subject: [PATCH] Show photo by pk --- photologue/models.py | 2 +- photologue/urls.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/photologue/models.py b/photologue/models.py index c1148a9..0072f6d 100644 --- a/photologue/models.py +++ b/photologue/models.py @@ -502,7 +502,7 @@ class Photo(ImageModel): super().save(*args, **kwargs) def get_absolute_url(self): - return reverse('photologue:pl-photo', args=[self.slug]) + return reverse('photologue:pl-photo', args=[self.pk]) def public_galleries(self): """Return the public galleries to which this photo belongs.""" diff --git a/photologue/urls.py b/photologue/urls.py index ff49533..5169131 100644 --- a/photologue/urls.py +++ b/photologue/urls.py @@ -12,6 +12,6 @@ urlpatterns = [ path('gallery//', GalleryDetailView.as_view(), name='pl-gallery'), path('gallery///', GalleryDetailView.as_view(), name='pl-gallery-owner'), path('gallery//download/', GalleryDownload.as_view(), name='pl-gallery-download'), - path('photo//', PhotoDetailView.as_view(), name='pl-photo'), + path('photo//', PhotoDetailView.as_view(), name='pl-photo'), path('upload/', GalleryUpload.as_view(), name='pl-gallery-upload'), ]