from __future__ import absolute_import

from django.contrib import admin

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'),
    prepopulated_fields = {"slug": ("headline",)}
)

from __future__ import absolute_import

from django.contrib import admin

from .models import Entry

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)

Use proper ModelAdmin for blog entry
Use proper ModelAdmin for blog entry
  from __future__ import absolute_import
  
  from django.contrib import admin
  
  from .models import Entry
  
- admin.site.register(Entry,
+ class EntryAdmin(admin.ModelAdmin):
-     list_display = ('headline', 'pub_date', 'is_active', 'is_published', 'author'),
+     list_display = ('headline', 'pub_date', 'is_active', 'is_published', 'author')
-     list_filter = ('is_active',),
+     list_filter = ('is_active',)
-     exclude = ('summary_html', 'body_html'),
+     exclude = ('summary_html', 'body_html')
      prepopulated_fields = {"slug": ("headline",)}
- )
  
+ admin.site.register(Entry, EntryAdmin)
+ 
Use proper ModelAdmin for blog entry
## Code Before:
from __future__ import absolute_import

from django.contrib import admin

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'),
    prepopulated_fields = {"slug": ("headline",)}
)

## Instruction:
Use proper ModelAdmin for blog entry
## Code After:
from __future__ import absolute_import

from django.contrib import admin

from .models import Entry

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)
