diff --git a/src/fellchensammlung/models.py b/src/fellchensammlung/models.py index 36991b3..5bfc894 100644 --- a/src/fellchensammlung/models.py +++ b/src/fellchensammlung/models.py @@ -559,6 +559,11 @@ class BaseNotification(models.Model): class CommentNotification(BaseNotification): comment = models.ForeignKey(Comment, on_delete=models.CASCADE, verbose_name=_('Antwort')) + @property + def url(self): + print(f"URL: self.comment.get_absolute_url()") + return self.comment.get_absolute_url + class Subscriptions(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE, verbose_name=_('Nutzer*in')) diff --git a/src/fellchensammlung/templates/fellchensammlung/partials/partial-notification.html b/src/fellchensammlung/templates/fellchensammlung/partials/partial-notification.html index 816799e..6ba642b 100644 --- a/src/fellchensammlung/templates/fellchensammlung/partials/partial-notification.html +++ b/src/fellchensammlung/templates/fellchensammlung/partials/partial-notification.html @@ -2,7 +2,7 @@ {% load custom_tags %}