feat: Link adoption notices in list of them

This commit is contained in:
2024-03-20 10:32:00 +01:00
parent c27c00c679
commit 29667c86b9
2 changed files with 5 additions and 1 deletions

View File

@@ -81,6 +81,10 @@ class AdoptionNotice(models.Model):
def animals_list(self):
return self.animals.all()
def get_absolute_url(self):
"""Returns the url to access a detailed page for the animal."""
return reverse('adoption-notice-detail', args=[str(self.id)])
class Animal(models.Model):
MALE_NEUTERED = "M_N"