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'), ]