Commit 953b5f8c authored by Norberto Tadeo's avatar Norberto Tadeo 😔

changed minor lines in models.py, removed some lines

parent 669110ae
......@@ -5,17 +5,16 @@ class Post(models.Model):
post_title = models.CharField(max_length=50)
post_body = models.CharField(max_length=100000)
pub_date = models.DateField(auto_now_add=True)
author = models.ForeignKey(WidgetUser, null = True, on_delete=models.CASCADE, default = "Anonymous")
author = models.ForeignKey(WidgetUser, on_delete=models.CASCADE, default = None)
def __str__(self):
return'{}: {}'.format(self.post_title,self.pub_date)
class Reply(models.Model):
post = models.ForeignKey(Post, null = True, on_delete=models.CASCADE, default = None)
post = models.ForeignKey(Post, on_delete=models.CASCADE, default = None)
reply_body = models.CharField(max_length=100000)
pub_date = models.DateField(auto_now_add=True)
author = models.ForeignKey(WidgetUser, null = True, on_delete=models.CASCADE, default ='Anonymous')
active = models.BooleanField(default=True)
author = models.ForeignKey(WidgetUser, on_delete=models.CASCADE, default = None)
def __str__(self):
if len(self.reply_body) >= 50:
......
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