I'm following the tutorial on the book "Practical Django Projects",
and I just can't inline the SearchKeywords to Flatpages, maybe the
problem lays in the fact that I'm using the development version of
django. It doesn't output any error, it just shows the flatpages
standard admin page, without any inline. This is the code I'm using:
#admin.py
from django.contrib import admin
from cms.search.models import SearchKeyword
from django.contrib.flatpages.models import FlatPage
from django.contrib.flatpages.admin import FlatPageAdmin
class SearchKeywordInline(admin.StackedInline):
model = SearchKeyword
class CustomFlatPageAdmin(FlatPageAdmin):
inlines = [SearchKeywordInline]
#unregister the default FlatPage admin and register
CustomFlatPageAdmin.
admin.site.unregister(FlatPage)
admin.site.register(FlatPage, CustomFlatPageAdmin)
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.