Permalink
Browse files

Use proper ModelAdmin for blog entry

  • Loading branch information...
1 parent 425de86 commit c7511d81236f2a28019d8d8e103b03e0d1150e32 @jphalip jphalip committed May 10, 2011
Showing with 6 additions and 5 deletions.
  1. +6 −5 django_website/blog/admin.py
View
11 django_website/blog/admin.py
@@ -4,9 +4,10 @@
from .models import Entry
-admin.site.register(Entry,
- list_display = ('headline', 'pub_date', 'is_active', 'is_published', 'author'),
- list_filter = ('is_active',),
- exclude = ('summary_html', 'body_html'),
+class EntryAdmin(admin.ModelAdmin):
+ list_display = ('headline', 'pub_date', 'is_active', 'is_published', 'author')
+ list_filter = ('is_active',)
+ exclude = ('summary_html', 'body_html')
prepopulated_fields = {"slug": ("headline",)}
-)
+
+admin.site.register(Entry, EntryAdmin)

0 comments on commit c7511d8

Please sign in to comment.