Commit 5206ff8d authored by Migs Atienza's avatar Migs Atienza

Added Models

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