from django.contrib import admin
-from philo.admin import EntityAdmin
-from philo.contrib.penfield.models import BlogEntry, Blog, BlogView, Newsletter, NewsletterArticle, NewsletterIssue, NewsletterView, Embed
+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 EmbedAdmin(admin.ModelAdmin):
- pass
-
-
-admin.site.register(Embed, EmbedAdmin)
admin.site.register(Blog, BlogAdmin)
admin.site.register(BlogEntry, BlogEntryAdmin)
admin.site.register(BlogView, BlogViewAdmin)