diff --git a/core/notifications/models.py b/core/notifications/models.py index abb7bb7..af33126 100644 --- a/core/notifications/models.py +++ b/core/notifications/models.py @@ -9,6 +9,9 @@ class MessageTemplate(models.Model): created = models.DateTimeField(auto_now_add=True) marked_confidential = models.BooleanField(default=False) + def __str__(self): + return self.name + class UserNotificationChannel(models.Model): user = models.ForeignKey(ExtendedUser, models.CASCADE) @@ -20,3 +23,6 @@ class UserNotificationChannel(models.Model): def validate_constraints(self, exclude=None): # TODO: email -> emailaddress, telegram -> chatid return True + + def __str__(self): + return self.user.username + ' - ' + self.channel_type + ' -> ' + self.channel_target