Commit 74cce3ea authored by nekopilar's avatar nekopilar

added reply model

parent 80ce3337
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=75) post_title = models.CharField(max_length=75)
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