summaryrefslogtreecommitdiff
path: root/comments/models.py
diff options
context:
space:
mode:
authorJayaram R Pai2014-07-06 23:10:02 +0530
committerJayaram R Pai2014-07-06 23:10:02 +0530
commit4c535a956e8a6d5bb9c0b124f4180fcf9d0275e9 (patch)
tree297c4033affb5f52cb8ff2009dfcc2edc7aef45e /comments/models.py
parent36e7f06608eb339082c2e905133bd7d83d9b36f0 (diff)
downloadPython-TBC-Interface-4c535a956e8a6d5bb9c0b124f4180fcf9d0275e9.tar.gz
Python-TBC-Interface-4c535a956e8a6d5bb9c0b124f4180fcf9d0275e9.tar.bz2
Python-TBC-Interface-4c535a956e8a6d5bb9c0b124f4180fcf9d0275e9.zip
added comments app
Diffstat (limited to 'comments/models.py')
-rw-r--r--comments/models.py18
1 files changed, 18 insertions, 0 deletions
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)
+