diff options
Diffstat (limited to 'app/unused_apps/prompts/admin.py')
-rw-r--r-- | app/unused_apps/prompts/admin.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app/unused_apps/prompts/admin.py b/app/unused_apps/prompts/admin.py new file mode 100644 index 0000000..f12c904 --- /dev/null +++ b/app/unused_apps/prompts/admin.py @@ -0,0 +1,30 @@ +from django.contrib import admin + +from utils.widgets import LGEntryForm +from .models import Prompt + + +@admin.register(Prompt) +class PromptAdmin(admin.ModelAdmin): + form = LGEntryForm + prepopulated_fields = {"slug": ('title',)} + list_display = ('title', 'source', 'prompt_type') + list_filter = ('source', 'prompt_type') + fieldsets = ( + ('Prompt', { + 'fields': ( + 'title', + 'subtitle', + 'body_markdown', + ('pub_date', 'prompt_type'), + ('slug','source'), + 'meta_description' + ), + 'classes': ( + 'show', + 'extrapretty', + 'wide' + ) + } + ), + ) |