Commit 321ea1ec authored by Rurik Serzo's avatar Rurik Serzo

Created reply model

parent 9c67525d
from django.db import models from django.db import models
from homepage.models import WidgetUser
class Post(models.Model): 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)
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
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