class Message models Model author models ForeignKey User related_name

1
2
3
4
5
class Message(models.Model):
author = models.ForeignKey(User, related_name='author')
class Comment(Message):
message = models.ForeignKey(Message, related_name='comment_set')