from django.contrib import admin
-from philo.admin import EntityAdmin
-from philo.contrib.penfield.models import BlogEntry, Blog, BlogView, Newsletter, NewsletterArticle, NewsletterIssue, NewsletterView, Test
+from philo.admin import EntityAdmin, AddTagAdmin
+from philo.contrib.penfield.models import BlogEntry, Blog, BlogView, Newsletter, NewsletterArticle, NewsletterIssue, NewsletterView
class TitledAdmin(EntityAdmin):
pass
-class BlogEntryAdmin(TitledAdmin):
+class BlogEntryAdmin(TitledAdmin, AddTagAdmin):
filter_horizontal = ['tags']
pass
-class NewsletterArticleAdmin(TitledAdmin):
- pass
+class NewsletterArticleAdmin(TitledAdmin, AddTagAdmin):
+ filter_horizontal = TitledAdmin.filter_horizontal + ('tags', 'authors')
class NewsletterIssueAdmin(TitledAdmin):
pass
-class TestAdmin(admin.ModelAdmin):
- pass
-
-
-admin.site.register(Test, TestAdmin)
admin.site.register(Blog, BlogAdmin)
admin.site.register(BlogEntry, BlogEntryAdmin)
admin.site.register(BlogView, BlogViewAdmin)