khaganat-web/pages/admin.py
2018-01-13 15:45:54 +01:00

11 lines
263 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)