diff options
author | lxf <sng@luxagraf.net> | 2019-05-25 15:10:38 +0000 |
---|---|---|
committer | lxf <sng@luxagraf.net> | 2019-05-25 15:10:38 +0000 |
commit | dd09ca3810ea0798899870930c3efb388b776a7c (patch) | |
tree | 0cf0f8ba6c44b774a0867f48fce9cafb96620974 /app/unused_apps/figments/admin.py | |
parent | fc037fa9bf0eee9920ae1da14ce80d594f39cba4 (diff) |
made some changes to use new checkin model
Diffstat (limited to 'app/unused_apps/figments/admin.py')
-rw-r--r-- | app/unused_apps/figments/admin.py | 46 |
1 files changed, 46 insertions, 0 deletions
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) |