From: Stephen Burrows Date: Wed, 13 Oct 2010 18:46:49 +0000 (-0400) Subject: Added search field to tags; added db_index=True to newsletter article full_text to... X-Git-Tag: philo-0.9~29^2~10 X-Git-Url: http://git.ithinksw.org/philo.git/commitdiff_plain/e17036efc3c8f292703647fc34c79a6610710942 Added search field to tags; added db_index=True to newsletter article full_text to expediate searching. --- diff --git a/admin/base.py b/admin/base.py index 46c7c22..b7c93d7 100644 --- a/admin/base.py +++ b/admin/base.py @@ -34,5 +34,6 @@ class EntityAdmin(admin.ModelAdmin): class TagAdmin(admin.ModelAdmin): list_display = ('name', 'slug') prepopulated_fields = {"slug": ("name",)} + search_fields = ["name"] admin.site.register(Tag, TagAdmin) \ No newline at end of file diff --git a/contrib/penfield/models.py b/contrib/penfield/models.py index c9c024c..d110704 100644 --- a/contrib/penfield/models.py +++ b/contrib/penfield/models.py @@ -258,7 +258,7 @@ class NewsletterArticle(Entity, Titled): authors = models.ManyToManyField(getattr(settings, 'PHILO_PERSON_MODULE', 'auth.User'), related_name='newsletterarticles') date = models.DateTimeField(default=datetime.now) lede = TemplateField(null=True, blank=True, verbose_name='Summary') - full_text = TemplateField() + full_text = TemplateField(db_index=True) tags = models.ManyToManyField(Tag, related_name='newsletterarticles', blank=True, null=True) class Meta: