Update Canonical_url

This commit is contained in:
Nyymix 2025-05-04 20:19:32 +03:00
parent 7d52895b19
commit bf084c2085
4 changed files with 48 additions and 19 deletions

View file

@ -66,6 +66,9 @@ class Photo(models.Model):
def get_absolute_url(self):
return reverse('gallery:photo_url', kwargs={'album_slug': self.album.slug, 'photo_slug': self.slug})
def get_slideshow_url(self):
return reverse('gallery:photo_slideshow_url', kwargs={'album_slug': self.album.slug, 'photo_slug': self.slug})
class Meta:
unique_together = ('album', "slug")
verbose_name_plural = "Photos"