From 4c535a956e8a6d5bb9c0b124f4180fcf9d0275e9 Mon Sep 17 00:00:00 2001 From: Jayaram R Pai Date: Sun, 6 Jul 2014 23:10:02 +0530 Subject: added comments app --- comments/models.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 comments/models.py (limited to 'comments/models.py') diff --git a/comments/models.py b/comments/models.py new file mode 100644 index 0000000..390b274 --- /dev/null +++ b/comments/models.py @@ -0,0 +1,18 @@ +from django.db import models + +class Comment(models.Model): + title = models.CharField(max_length=200) + body = models.TextField() + book = models.CharField(max_length=200) + chapter = models.CharField(max_length=10) + example = models.CharField(max_length=10) + page = models.CharField(max_length=10) + date_created = models.DateTimeField(auto_now_add=True) + date_modified = models.DateTimeField(auto_now=True) + +class Reply(models.Model): + comment = models.ForeignKey(Comment) + body = models.CharField(max_length=200) + date_created = models.DateTimeField(auto_now_add=True) + date_modified = models.DateTimeField(auto_now=True) + -- cgit