summaryrefslogtreecommitdiff
path: root/app/unused_apps/figments/admin.py
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2019-05-25 15:10:38 +0000
committerlxf <sng@luxagraf.net>2019-05-25 15:10:38 +0000
commitdd09ca3810ea0798899870930c3efb388b776a7c (patch)
tree0cf0f8ba6c44b774a0867f48fce9cafb96620974 /app/unused_apps/figments/admin.py
parentfc037fa9bf0eee9920ae1da14ce80d594f39cba4 (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.py46
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)