summaryrefslogtreecommitdiff
path: root/app/unused_apps/prompts/admin.py
blob: f12c904b910c1c4e741ecb180e73499d37c6fd14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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'
            )
        }
        ),
    )