From dd09ca3810ea0798899870930c3efb388b776a7c Mon Sep 17 00:00:00 2001 From: lxf Date: Sat, 25 May 2019 15:10:38 +0000 Subject: made some changes to use new checkin model --- app/unused_apps/figments/admin.py | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 app/unused_apps/figments/admin.py (limited to 'app/unused_apps/figments/admin.py') diff --git a/app/unused_apps/figments/admin.py b/app/unused_apps/figments/admin.py new file mode 100644 index 0000000..34452bd --- /dev/null +++ b/app/unused_apps/figments/admin.py @@ -0,0 +1,46 @@ +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) -- cgit v1.2.3-70-g09d2