from django.db import models # Create your models here. class Author(models.Model): name = models.CharField(max_length=100) notes = models.TextField(blank=True, help_text= \ "Notes for the author; may be left blank. Will \ not be HTML-escaped.") def __unicode__(self): return self.name class Tag(models.Model): tag = models.CharField(max_length=100) def __unicode__(self): return self.tag class Meta: ordering = ("tag", ) class Quote(models.Model): text = models.TextField() author = models.ForeignKey(Author) tags = models.ManyToManyField(Tag, blank=True) def __unicode__(self): return self.author.name + ": " + self.text