add message
This commit is contained in:
parent
0c6f2d31f6
commit
4dbfe71f70
|
@ -54,7 +54,7 @@ class Notice(models.Model):
|
|||
|
||||
class Task(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
created_by = models.ForeignKey(User, on_delete=models.SET_NULL)
|
||||
created_by = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||
groups = models.ManyToManyField(Group)
|
||||
content = models.TextField('内容', null=True, blank=True)
|
||||
added = models.DateTimeField(auto_now_add=True)
|
||||
|
@ -110,7 +110,6 @@ class Message(models.Model):
|
|||
send_to = models.ForeignKey(Group, on_delete=models.CASCADE)
|
||||
content = models.TextField('内容', null=True, blank=True)
|
||||
task = models.ForeignKey(Task, on_delete=models.CASCADE)
|
||||
addition = models.ForeignKey(MessageAddition, on_delete=models.CASCADE)
|
||||
|
||||
added = models.DateTimeField(auto_now_add=True)
|
||||
updated = models.DateTimeField(auto_now=True)
|
||||
|
@ -119,7 +118,7 @@ class Message(models.Model):
|
|||
ordering = ["-added"]
|
||||
|
||||
def __str__(self):
|
||||
return self.send_from + ':' + self.send_to
|
||||
return self.send_from + ':' + self.send_toÒ
|
||||
|
||||
|
||||
class MessageAddition(models.Model):
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -8,3 +8,4 @@ channels
|
|||
requests
|
||||
parsel
|
||||
django-summernote
|
||||
python-dateutil
|
Loading…
Reference in New Issue