diff options
Diffstat (limited to 'bak/unused_apps/essays/admin.py')
-rw-r--r-- | bak/unused_apps/essays/admin.py | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/bak/unused_apps/essays/admin.py b/bak/unused_apps/essays/admin.py new file mode 100644 index 0000000..ed39ca3 --- /dev/null +++ b/bak/unused_apps/essays/admin.py @@ -0,0 +1,47 @@ +from django.contrib import admin + +from utils.widgets import LGEntryForm + +from .models import Essay + + +@admin.register(Essay) +class EssayAdmin(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', + 'body_markdown', + ('pub_date', 'status'), + 'meta_description', + ('slug', 'enable_comments', 'has_code'), + ), + 'classes': ( + 'show', + 'extrapretty', + 'wide' + ) + }), + ('meta', { + 'fields': ( + 'originally_published_by', + 'originally_published_by_url', + 'afterword', + 'preamble', + ('field_notes', 'books'), + ), + 'classes': ( + 'hide', + 'extrapretty', + 'wide' + ) + }), + ) + + class Media: + js = ('image-loader.js', 'next-prev-links.js') |