from django.db import models
-from localmodels import HTMLField
+from localmodels import HTMLField, TagField
# Create your models here.
-class Tag(models.Model):
- tag = models.CharField(max_length=100)
- def __unicode__(self):
- return self.tag
-
class Author(models.Model):
name = models.CharField(max_length=100,
help_text="Name of the author")
pvt_notes = HTMLField(blank=True, help_text= \
"Notes about the author; not displayed on \
the public interface",)
- tags = models.ManyToManyField(Tag, blank=True)
+ tags = TagField()
birth_date = models.DateField(blank=True, null=True,
help_text="Date of birth")
author = models.ForeignKey(Author)
date = models.DateField(blank=True, null=True,
help_text="Date of the quote")
- tags = models.ManyToManyField(Tag, blank=True)
+ tags = TagField()
notes = HTMLField(blank=True, help_text= \
"Notes about the work; may be left blank. Will \
class Quote(models.Model):
text = HTMLField()
- tags = models.ManyToManyField(Tag, blank=True)
+ tags = TagField()
work = models.ForeignKey(Work)
notes = HTMLField(blank=True, help_text= \