X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/f69e27528218f5db3e4fafd536be49f473e3b8fd..a2d75eae2cab588a28155b9c901935aa8d664d5f:/contrib/penfield/gilbert.py?ds=sidebyside diff --git a/contrib/penfield/gilbert.py b/contrib/penfield/gilbert.py index fb284a5..e6e8251 100644 --- a/contrib/penfield/gilbert.py +++ b/contrib/penfield/gilbert.py @@ -1,9 +1,19 @@ from .models import Blog, BlogEntry, BlogView, NewsletterArticle, NewsletterIssue, Newsletter, NewsletterView from philo.contrib.gilbert import site +from philo.contrib.gilbert.plugins.models import ModelAdmin -site.register_model(Blog, icon_name='blog') -site.register_model(BlogEntry, search_fields=('title', 'content',), icon_name='document-snippet') +class BlogAdmin(ModelAdmin): + search_fields = ('title',) + + +class BlogEntryAdmin(ModelAdmin): + search_fields = ('title', 'content',) + data_columns = ('title', 'author', 'blog', 'date',) + + +site.register_model(Blog, BlogAdmin, icon_name='blog') +site.register_model(BlogEntry, BlogEntryAdmin, icon_name='document-snippet') site.register_model(BlogView, icon_name='application-blog') site.register_model(NewsletterArticle, icon_name='document-snippet') site.register_model(NewsletterIssue, icon_name='newspaper')