Commit f82b13aa authored by Rurik Serzo's avatar Rurik Serzo

Added authors under post model

parent 321ea1ec
...@@ -6,6 +6,7 @@ class Post(models.Model): ...@@ -6,6 +6,7 @@ class Post(models.Model):
post_title = models.CharField(max_length=100) post_title = models.CharField(max_length=100)
post_body = models.TextField() post_body = models.TextField()
pub_date = models.DateField(auto_now_add=True) pub_date = models.DateField(auto_now_add=True)
author = models.ForeignKey(WidgetUser,on_delete=models.CASCADE,null=True)
class Reply(models.Model): class Reply(models.Model):
reply_body = models.TextField() reply_body = models.TextField()
......
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