from django.contrib import admin
from .models import Content


class ContentAdmin(admin.ModelAdmin):
    list_display = ('title', 'content_group', 'key', 'updated', )
    search_fields = ('title', 'content', )
    list_filter = ('content_group', 'created', 'updated')
    readonly_fields = ('created', 'updated', 'key',)
    ordering = ('content_group',)

admin.site.register(Content, ContentAdmin)

from django.contrib import admin
from .models import Content


class ContentAdmin(admin.ModelAdmin):
    list_display = ('title', 'content_group', 'key', 'updated', )
    search_fields = ('title', 'content', )
    list_filter = ('content_group', 'created', 'updated')
    readonly_fields = ('created', 'updated', 'key',)
    ordering = ('content_group',)
    fieldsets = (
        (None, {
            'fields': ('title', 'content', 'content_group')
        }),
        ('Extra info', {
            'fields': ('key', 'created', 'updated')
        }),
    )
    exclude = ('content_type',)

admin.site.register(Content, ContentAdmin)

clean up admin form with fieldsets and hide the content type drop down as there is no front end functionality to use that yet - was just confusing to have on there at this point