feat: Add adoption notice detail view

This commit is contained in:
2024-03-20 10:35:40 +01:00
parent 96c82ef8e5
commit f47fc5eee2
2 changed files with 5 additions and 3 deletions

View File

@@ -78,8 +78,8 @@ class AdoptionNotice(models.Model):
photos = models.ManyToManyField(Image, blank=True)
@property
def animals_list(self):
return self.animals.all()
def animals(self):
return Animal.objects.filter(adoption_notice=self)
def get_absolute_url(self):
"""Returns the url to access a detailed page for the animal."""