from django.contrib import admin from .models import Figment, Series from utils.widgets import LGEntryForm class FigmentAdmin(admin.ModelAdmin): form = LGEntryForm list_display = ('title', 'pub_date', 'get_series') prepopulated_fields = {"slug": ('title',)} fieldsets = ( ('Figment', { 'fields': ( 'title', 'body_markdown', ('slug', 'status'), 'pub_date', ), 'classes': ( 'show', 'extrapretty', 'wide' ) } ), ('Extra', { 'fields': ( 'dek', 'prologue', 'series', 'published_link', ), 'classes': ( 'collapse', 'extrapretty', 'wide' ) } ), ) class SeriesAdmin(admin.ModelAdmin): pass admin.site.register(Figment, FigmentAdmin) admin.site.register(Series, SeriesAdmin)