Commit dab5215a authored by Rurik Serzo's avatar Rurik Serzo

Added post relation to reply

parent 1e47f47c
......@@ -11,4 +11,5 @@ class Post(models.Model):
class Reply(models.Model):
reply_body = models.TextField()
pub_date = models.DateField(auto_now_add=True)
author = models.ForeignKey(WidgetUser,on_delete=models.CASCADE,null=True)
\ No newline at end of file
author = models.ForeignKey(WidgetUser,on_delete=models.CASCADE,null=True)
post = models.ForeignKey(Post,on_delete=models.CASCADE,null=True,related_name="posts")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment