From 2fd5bca07cbc3ae0993d4b73522b481dff2e3cfa Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Wed, 30 Sep 2015 09:09:28 +0200 Subject: [PATCH] Enhance the admin --- djangocms_blog/admin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/djangocms_blog/admin.py b/djangocms_blog/admin.py index 95a3641..b21f256 100755 --- a/djangocms_blog/admin.py +++ b/djangocms_blog/admin.py @@ -39,7 +39,10 @@ class BlogCategoryAdmin(EnhancedModelAdminMixin, ModelAppHookConfig, Translatabl class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, ModelAppHookConfig, TranslatableAdmin): form = PostAdminForm - list_display = ['title', 'author', 'date_published', 'date_published_end'] + list_display = [ + 'title', 'author', 'date_published', 'app_config', 'languages', 'date_published_end' + ] + list_filter = ('app_config',) date_hierarchy = 'date_published' raw_id_fields = ['author'] frontend_editable_fields = ('title', 'abstract', 'post_text') @@ -67,6 +70,9 @@ class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, 'default_published': 'publish' } + def languages(self, obj): + return ','.join(obj.get_available_languages()) + def formfield_for_dbfield(self, db_field, **kwargs): field = super(PostAdmin, self).formfield_for_dbfield(db_field, **kwargs) if db_field.name == 'meta_description':