summaryrefslogtreecommitdiff
path: root/app/pages/admin.py
blob: 66e4d8f84c5727eb3e66c669955e5082a5e1cf58 (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
from django.contrib import admin

from django.forms import Textarea
from django.db import models

'''
class PageAdmin(admin.ModelAdmin):
    formfield_overrides = {
        models.TextField: {'widget': Textarea(attrs={'rows': 25, 'cols': 40})},
    }
    list_display = ('title', 'slug',)
    search_fields = ['title', 'body_markdown']
    prepopulated_fields = {"slug": ('title',)}
    fieldsets = (
        ('Page', {
            'fields': ('title', 'body_markdown', 'slug'),
            'classes': ('show', 'extrapretty', 'wide')
        }),
        ('Metadata', {
            'classes': ('collapse closed',),
            'fields': ('meta_description',),
        })
    )

admin.site.register(Page, PageAdmin)
'''