X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/88b23340408306299605a34a7b14561737b7403d..a79b7c9e4f8038db3795b482c78b2c6d7f64bebb:/models/pages.py?ds=sidebyside diff --git a/models/pages.py b/models/pages.py index 81b84c9..ef68b5f 100644 --- a/models/pages.py +++ b/models/pages.py @@ -108,7 +108,7 @@ class Page(View): class Contentlet(models.Model): page = models.ForeignKey(Page, related_name='contentlets') - name = models.CharField(max_length=255) + name = models.CharField(max_length=255, db_index=True) content = TemplateField() def __unicode__(self): @@ -120,7 +120,7 @@ class Contentlet(models.Model): class ContentReference(models.Model): page = models.ForeignKey(Page, related_name='contentreferences') - name = models.CharField(max_length=255) + name = models.CharField(max_length=255, db_index=True) content_type = models.ForeignKey(ContentType, verbose_name='Content type') content_id = models.PositiveIntegerField(verbose_name='Content ID', blank=True, null=True) content = generic.GenericForeignKey('content_type', 'content_id')