Branch master was renamed to main.

khaganat-web/pages/admin.py

15 lines
267 B
Python
Raw Permalink Normal View History

2018-01-13 14:45:54 +00:00
from django.contrib import admin
2018-01-27 22:12:09 +00:00
from .models import Page, PageContent
2018-01-13 14:45:54 +00:00
class PageContentInline(admin.StackedInline):
model = PageContent
extra = 2
2018-01-27 22:12:09 +00:00
2018-01-13 14:45:54 +00:00
class PageAdmin(admin.ModelAdmin):
inlines = [PageContentInline]
2018-01-27 22:12:09 +00:00
2018-01-13 14:45:54 +00:00
admin.site.register(Page, PageAdmin)