Skip to content

Commit

Permalink
Use proper ModelAdmin for blog entry
Browse files Browse the repository at this point in the history
  • Loading branch information
jphalip committed May 10, 2011
1 parent 425de86 commit c7511d8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions django_website/blog/admin.py
Expand Up @@ -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.