1 from django.db import models
3 # Create your models here.
5 class Author(models.Model):
6 name = models.CharField(max_length=100)
11 class Tag(models.Model):
12 tag = models.CharField(max_length=100)
14 def __unicode__(self):
20 class Quote(models.Model):
21 text = models.TextField()
22 author = models.ForeignKey(Author)
23 tags = models.ManyToManyField(Tag, blank=True)
25 def __unicode__(self):
26 return self.author.name + ": " + self.text