stash
This commit is contained in:
parent
4a8a9fa90f
commit
b7fb0c6fb3
1 changed files with 6 additions and 0 deletions
|
@ -9,6 +9,9 @@ class MessageTemplate(models.Model):
|
||||||
created = models.DateTimeField(auto_now_add=True)
|
created = models.DateTimeField(auto_now_add=True)
|
||||||
marked_confidential = models.BooleanField(default=False)
|
marked_confidential = models.BooleanField(default=False)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.name
|
||||||
|
|
||||||
|
|
||||||
class UserNotificationChannel(models.Model):
|
class UserNotificationChannel(models.Model):
|
||||||
user = models.ForeignKey(ExtendedUser, models.CASCADE)
|
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
|
def validate_constraints(self, exclude=None): # TODO: email -> emailaddress, telegram -> chatid
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.user.username + ' - ' + self.channel_type + ' -> ' + self.channel_target
|
||||||
|
|
Loading…
Reference in a new issue