Corrected ExtMethod keyword generation to eliminate unicode. Added capfirst use for...
[philo.git] / contrib / penfield / gilbert.py
index fb284a5..cae1936 100644 (file)
@@ -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', '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')