Show photo by pk
This commit is contained in:
parent
7f425eacb7
commit
ced85c7b44
2 changed files with 2 additions and 2 deletions
|
|
@ -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."""
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@ urlpatterns = [
|
|||
path('gallery/<slug:slug>/', GalleryDetailView.as_view(), name='pl-gallery'),
|
||||
path('gallery/<slug:slug>/<int:owner>/', GalleryDetailView.as_view(), name='pl-gallery-owner'),
|
||||
path('gallery/<slug:slug>/download/', GalleryDownload.as_view(), name='pl-gallery-download'),
|
||||
path('photo/<slug:slug>/', PhotoDetailView.as_view(), name='pl-photo'),
|
||||
path('photo/<int:pk>/', PhotoDetailView.as_view(), name='pl-photo'),
|
||||
path('upload/', GalleryUpload.as_view(), name='pl-gallery-upload'),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue