facts: provide Fact as an inline on FactCategory
closes bss/dr.botzo#14
This commit is contained in:
parent
cd31bbb489
commit
36e2de5dfd
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user