dr.botzo/facts/admin.py

21 lines
455 B
Python

"""Admin interface for the facts app."""
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, FactCategoryAdmin)