From cd92451e78e12f3040e2789b25774e434f8b1bb0 Mon Sep 17 00:00:00 2001 From: Patrick Hetu Date: Thu, 14 Jul 2016 14:36:45 -0400 Subject: [PATCH] Post Admin filter by tags and search by title --- djangocms_blog/admin.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/djangocms_blog/admin.py b/djangocms_blog/admin.py index ce10d10..d76cc95 100755 --- a/djangocms_blog/admin.py +++ b/djangocms_blog/admin.py @@ -55,7 +55,16 @@ class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, 'title', 'author', 'date_published', 'app_config', 'all_languages_column', 'date_published_end' ] - list_filter = ('app_config',) + try: + from taggit_helpers.admin import TaggitListFilter + list_filter = ('app_config', TaggitListFilter) + except ImportError: + try: + from taggit_helpers import TaggitListFilter + list_filter = ('app_config', TaggitListFilter) + except ImportError: + list_filter = ('app_config',) + search_fields = ('translations__title',) date_hierarchy = 'date_published' raw_id_fields = ['author'] frontend_editable_fields = ('title', 'abstract', 'post_text')