from django.contrib import admin
from . import models as blog 

class ArticleAdmin(admin.ModelAdmin):
    ordering = ('-date',)
    list_filter = ('id', 'date',)
    list_display = ('id', 'title', 'date', 'category',)
    search_fields = ('id', 'title', 'date', 'category',)
    date_hierarchy = 'date'
    filter_horizontal = ('tags',) # for ease of use

admin.site.register(blog.Article, ArticleAdmin)
admin.site.register(blog.Category)
admin.site.register(blog.Tag)

@@ -57,16 +57,351 @@
  blog %0A%0A
+class TagAdmin(admin.ModelAdmin):%0A    ordering = ('name',)%0A    list_filter = ('id', 'name',)%0A    list_display = ('id', 'name',)%0A    search_fields = ('id', 'name',)%0A%0Aclass CategoryAdmin(admin.ModelAdmin):%0A    ordering = ('name',)%0A    list_filter = ('id', 'name',)%0A    list_display = ('id', 'name',)%0A    search_fields = ('id', 'name',)%0A%0A
 class Ar
@@ -422,32 +422,32 @@
 in.ModelAdmin):%0A
-
     ordering = (
@@ -765,16 +765,31 @@
 Category
+, CategoryAdmin
 )%0Aadmin.
@@ -810,10 +810,20 @@
 blog.Tag
+, TagAdmin
 )%0A

add admin pages for Category and Tag models