X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/0eea7e496496023e9f68b4e1dc6a7956da7e917e..2371c4b82b7f9ea5121e95b42e1f9dc2e25eb148:/contrib/penfield/admin.py diff --git a/contrib/penfield/admin.py b/contrib/penfield/admin.py index 5faf4ef..c758e67 100644 --- a/contrib/penfield/admin.py +++ b/contrib/penfield/admin.py @@ -26,6 +26,13 @@ class NewsletterAdmin(TitledAdmin): class NewsletterArticleAdmin(TitledAdmin, AddTagAdmin): filter_horizontal = TitledAdmin.filter_horizontal + ('tags', 'authors') + list_display = ['title', 'date', 'author_names'] + search_fields = ('title', 'authors__name',) + date_hierarchy = 'date' + + def author_names(self, obj): + return ', '.join([author.get_full_name() for author in obj.authors.all()]) + author_names.short_description = "Authors" class NewsletterIssueAdmin(TitledAdmin):