Change notification backend

This commit is contained in:
cuom1999 2023-10-10 17:38:48 -05:00
parent 5f97491f0d
commit 7f854c40dd
15 changed files with 188 additions and 134 deletions

View file

@ -177,29 +177,3 @@ class CommentLock(models.Model):
def __str__(self):
return str(self.page)
class Notification(models.Model):
owner = models.ForeignKey(
Profile,
verbose_name=_("owner"),
related_name="notifications",
on_delete=CASCADE,
)
time = models.DateTimeField(verbose_name=_("posted time"), auto_now_add=True)
comment = models.ForeignKey(
Comment, null=True, verbose_name=_("comment"), on_delete=CASCADE
)
read = models.BooleanField(verbose_name=_("read"), default=False)
category = models.CharField(verbose_name=_("category"), max_length=1000)
html_link = models.TextField(
default="",
verbose_name=_("html link to comments, used for non-comments"),
max_length=1000,
)
author = models.ForeignKey(
Profile,
null=True,
verbose_name=_("who trigger, used for non-comment"),
on_delete=CASCADE,
)