Added search field to tags; added db_index=True to newsletter article full_text to...
authorStephen Burrows <stephen.r.burrows@gmail.com>
Wed, 13 Oct 2010 18:46:49 +0000 (14:46 -0400)
committerStephen Burrows <stephen.r.burrows@gmail.com>
Wed, 13 Oct 2010 18:46:49 +0000 (14:46 -0400)
admin/base.py
contrib/penfield/models.py

index 46c7c22..b7c93d7 100644 (file)
@@ -34,5 +34,6 @@ class EntityAdmin(admin.ModelAdmin):
 class TagAdmin(admin.ModelAdmin):
        list_display = ('name', 'slug')
        prepopulated_fields = {"slug": ("name",)}
 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
 
 admin.site.register(Tag, TagAdmin)
\ No newline at end of file
index c9c024c..d110704 100644 (file)
@@ -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')
        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:
        tags = models.ManyToManyField(Tag, related_name='newsletterarticles', blank=True, null=True)
        
        class Meta: