X-Git-Url: http://gitweb.fperrin.net/?p=djsite.git;a=blobdiff_plain;f=quotes%2Fmodels.py;h=cdae648e21960c540bc2dbab1b9b8334ffdf9344;hp=9c65abc3c42862939534360a08ba0456ed98b8a9;hb=b22937332fc5fa45d2beb8fb0bf9495df7efa80c;hpb=809334de67823bbda3f1c95ccbb719bf7eb825e4 diff --git a/quotes/models.py b/quotes/models.py index 9c65abc..cdae648 100644 --- a/quotes/models.py +++ b/quotes/models.py @@ -1,7 +1,7 @@ from django.db import models +from tinymce import models as tinymce_models # Create your models here. - class Tag(models.Model): tag = models.CharField(max_length=100) def __unicode__(self): @@ -10,12 +10,12 @@ class Tag(models.Model): class Author(models.Model): name = models.CharField(max_length=100, help_text="Name of the author") - notes = models.TextField(blank=True, help_text= \ - "Notes about the author; may be left blank. Will \ - not be HTML-escaped.") + notes = tinymce_models.HTMLField(blank=True, help_text= \ + "Notes about the author; may be left blank. Will \ + not be HTML-escaped.",) pvt_notes = models.TextField(blank=True, help_text= \ "Notes about the author; not displayed on \ - the public interface") + the public interface",) tags = models.ManyToManyField(Tag, blank=True) birth_date = models.DateField(blank=True, null=True, @@ -62,7 +62,7 @@ class Work(models.Model): "Notes about the work; not displayed on \ the public interface") - def __unicode__(self): + def __str__(self): return "%s: %s (%s)" % (self.author.name, self.name, self.date) class Quote(models.Model):