1 from django.contrib import admin
2 from philo.admin import EntityAdmin
3 from philo.contrib.penfield.models import BlogEntry, Blog, BlogView, Newsletter, NewsletterArticle, NewsletterIssue, NewsletterView
6 class TitledAdmin(EntityAdmin):
7 prepopulated_fields = {'slug': ('title',)}
8 list_display = ('title', 'slug')
11 class BlogAdmin(TitledAdmin):
15 class BlogEntryAdmin(TitledAdmin):
19 class BlogViewAdmin(EntityAdmin):
23 class NewsletterAdmin(TitledAdmin):
27 class NewsletterArticleAdmin(TitledAdmin):
31 class NewsletterIssueAdmin(TitledAdmin):
35 class NewsletterViewAdmin(EntityAdmin):
39 admin.site.register(Blog, BlogAdmin)
40 admin.site.register(BlogEntry, BlogEntryAdmin)
41 admin.site.register(BlogView, BlogViewAdmin)
42 admin.site.register(Newsletter, NewsletterAdmin)
43 admin.site.register(NewsletterArticle, NewsletterArticleAdmin)
44 admin.site.register(NewsletterIssue, NewsletterIssueAdmin)
45 admin.site.register(NewsletterView, NewsletterViewAdmin)