diff --git a/todo/models.py b/todo/models.py index c79d3dc..17355a1 100644 --- a/todo/models.py +++ b/todo/models.py @@ -133,7 +133,8 @@ class Comment(models.Model): """ author = models.ForeignKey( - settings.AUTH_USER_MODEL, on_delete=models.CASCADE, blank=True, null=True + settings.AUTH_USER_MODEL, on_delete=models.CASCADE, blank=True, null=True, + related_name="todo_comments" ) task = models.ForeignKey(Task, on_delete=models.CASCADE) date = models.DateTimeField(default=datetime.datetime.now)