khaganat-web/pages/admin.py

12 lines
263 B
Python
Raw Normal View History

2018-01-13 14:45:54 +00:00
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)