diff --git a/src/fellchensammlung/models.py b/src/fellchensammlung/models.py index c908df1..b941143 100644 --- a/src/fellchensammlung/models.py +++ b/src/fellchensammlung/models.py @@ -113,6 +113,13 @@ class RescueOrganization(models.Model): comment = models.TextField(verbose_name=_("Kommentar"), null=True, blank=True, ) description = models.TextField(null=True, blank=True, verbose_name=_('Beschreibung')) # Markdown allowed + def get_absolute_url(self): + return reverse("rescue-organization-detail", args=[str(self.pk)]) + + @property + def adoption_notices(self): + return AdoptionNotice.objects.filter(organization=self) + class User(AbstractUser): """ diff --git a/src/fellchensammlung/templates/fellchensammlung/details/detail-rescue-organization.html b/src/fellchensammlung/templates/fellchensammlung/details/detail-rescue-organization.html index a84848c..f7326e3 100644 --- a/src/fellchensammlung/templates/fellchensammlung/details/detail-rescue-organization.html +++ b/src/fellchensammlung/templates/fellchensammlung/details/detail-rescue-organization.html @@ -16,4 +16,14 @@ {% endif %}
{{ org.description | render_markdown }}
+{% translate "Keine Vermittlungen gefunden." %}
+ {% endif %} +