X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/64e4cdefe89f642d349b5908a3bbaec76333e3b2..ba4bab73996c40c2551f7e5a0e478d0f553b8af3:/models/pages.py?ds=inline diff --git a/models/pages.py b/models/pages.py index 6f5bc9a..ef68b5f 100644 --- a/models/pages.py +++ b/models/pages.py @@ -102,20 +102,13 @@ class Page(View): if errors: raise ValidationError(errors) - def get_navigation(self, node, max_depth): - return { - 'url': node.get_absolute_url(), - 'title': self.title, - 'order': None, - } - class Meta: app_label = 'philo' 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): @@ -127,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')