khaganat-web/pages/admin.py
2018-01-27 23:12:09 +01:00

14 lines
267 B
Python

from django.contrib import admin
from .models import Page, PageContent
class PageContentInline(admin.StackedInline):
model = PageContent
extra = 2
class PageAdmin(admin.ModelAdmin):
inlines = [PageContentInline]
admin.site.register(Page, PageAdmin)