diff options
Diffstat (limited to 'app/guides/admin.py')
-rw-r--r-- | app/guides/admin.py | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/app/guides/admin.py b/app/guides/admin.py new file mode 100644 index 0000000..e424385 --- /dev/null +++ b/app/guides/admin.py @@ -0,0 +1,50 @@ +from django.contrib import admin + +from utils.widgets import LGEntryForm + +from .models import Guide + +@admin.register(Guide) +class GuideAdmin(admin.ModelAdmin): + form = LGEntryForm + list_display = ('title', 'pub_date', 'enable_comments', 'status') + list_filter = ('pub_date', 'enable_comments', 'status') + prepopulated_fields = {"slug": ('title',)} + fieldsets = ( + ('Entry', { + 'fields': ( + 'title', + ('sub_title', 'category'), + 'body_markdown', + ('pub_date', 'status'), + 'meta_description', + 'dek', + 'tags', + 'preamble_markdown', + 'featured_image', + 'has_video', + ('slug', 'enable_comments'), + ), + 'classes': ( + 'show', + 'extrapretty', + 'wide' + ) + }), + ('meta', { + 'fields': ( + 'point', + 'afterword', + ('field_notes', 'books'), + ('essays', 'jrnl'), + ), + 'classes': ( + 'hide', + 'extrapretty', + 'wide' + ) + }), + ) + + class Media: + js = ('image-loader.js', 'next-prev-links.js') |