1 from django.db import models
3 # Create your models here.
5 class Author(models.Model):
6 name = models.CharField(max_length=100)
7 notes = models.TextField(blank=True, help_text= \
8 "Notes for the author; may be left blank. Will \
11 def __unicode__(self):
14 class Tag(models.Model):
15 tag = models.CharField(max_length=100)
17 def __unicode__(self):
23 class Quote(models.Model):
24 text = models.TextField()
25 author = models.ForeignKey(Author)
26 tags = models.ManyToManyField(Tag, blank=True)
28 def __unicode__(self):
29 return self.author.name + ": " + self.text