summaryrefslogtreecommitdiff
path: root/comments/models.py
blob: 0c7f70fc4db2e4428fdda36c262ec3247b107388 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)
    email = models.CharField(max_length=100)
    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)
    email = models.CharField(max_length=100)
    date_created = models.DateTimeField(auto_now_add=True)
    date_modified = models.DateTimeField(auto_now=True)