Commit 782f8150 authored by Trisha Angel Millena's avatar Trisha Angel Millena

added Forum Post and Reply models

parent c81e41b9
from django.db import models
# Create your models here.
class ForumPost(models.Model):
title = models.CharField(max_length = 300)
body = models.TextField(max_length = 500)
author = models.ForeignKey(WidgetUser, on_delete = models.CASCADE)
pub_datetime = models.DateTimeField()
class Reply(models.Model):
body = models.CharField(max_length = 300)
author = models.ForeignKey(WidgetUser, on_delete = models.CASCADE)
pub_datetime = models.DateTimeField()
post = models.ForeignKey(ForumPost, on_delete = models.CASCADE)
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