Source

django-helper / django_helper / admin.py

from django.contrib import admin
from django_helper.models import TemplateTag, ContextProcessor, Middleware

class TemplateTagAdmin(admin.ModelAdmin):
    list_filter = ('tag_type', 'app_name', 'takes_context', )
    list_display = ('tag_name', 'tag_type', )
    filter_horizontal = ('required_context', )

class ContextProcessorAdmin(admin.ModelAdmin):
    list_filter = ('app_name', )
    filter_horizontal = ('required_middleware', )

class MiddlewareAdmin(admin.ModelAdmin):
    list_filter = ('process_request', 'process_view', 'process_template_response', 'process_response', 'process_exception', )
    list_display = ('name', 'process_request', 'process_view', 'process_template_response', 'process_response', 'process_exception', )

admin.site.register(TemplateTag, TemplateTagAdmin)
admin.site.register(ContextProcessor, ContextProcessorAdmin)
admin.site.register(Middleware, MiddlewareAdmin)