refactor(bulma): Add support for rescue organizations

This commit is contained in:
2025-05-22 19:46:24 +02:00
parent 328f64aa51
commit cf15b60bef
10 changed files with 192 additions and 7 deletions

View File

@@ -156,6 +156,9 @@ class RescueOrganization(models.Model):
def get_absolute_url(self):
return reverse("rescue-organization-detail", args=[str(self.pk)])
def get_absolute_url_bulma(self):
return reverse("bulma-rescue-organization-detail", args=[str(self.pk)])
@property
def adoption_notices(self):
return AdoptionNotice.objects.filter(organization=self)
@@ -173,6 +176,8 @@ class RescueOrganization(models.Model):
return ""
if len(self.description) > 200:
return self.description[:200] + _(f" ... [weiterlesen]({self.get_absolute_url()})")
else:
return self.description
def set_checked(self):
self.last_checked = timezone.now()