>Practical Django Projects (Chapter three), talks about defining an admin interface which is all well and good unless you’re using the NewForms Admin branch (which is intended to become part of Release 1.0). So if you’re an early adopter or reading this after the big change, you’ll be needing to do the following.
The reason I bothered writing this was I couldn’t work out how to override the fact that FlatPage had already registered a ModelAdmin (try to register yours throws an error). A pointer from #django on irc and a look at the source code revealed that unregister was the baby you wanted.
from django.contrib import adminfrom search.models import SearchKeywordfrom django.contrib.flatpages.models import FlatPage class SearchKeywordInline(admin.TabularInline): model = SearchKeyword class FlatPageAdmin(admin.ModelAdmin): inlines = [ SearchKeywordInline, ] # We have to unregister it, and then reregisteradmin.site.unregister(FlatPage)admin.site.register(FlatPage, FlatPageAdmin)