facts: provide Fact as an inline on FactCategory

closes bss/dr.botzo#14
This commit is contained in:
Brian S. Stephan 2017-02-11 08:44:07 -06:00
parent cd31bbb489
commit 36e2de5dfd

View File

@ -4,5 +4,17 @@ from django.contrib import admin
from facts.models import Fact, FactCategory
class FactInline(admin.TabularInline):
"""Inline admin form for facts, for inclusion in fact categories."""
model = Fact
class FactCategoryAdmin(admin.ModelAdmin):
"""Admin pages for the FactCategory model."""
inlines = [FactInline]
admin.site.register(Fact)
admin.site.register(FactCategory)
admin.site.register(FactCategory, FactCategoryAdmin)