I'm trying to find a way to filter the admin queryset for page objects based up on the user provided, what I've considered (pseudo code):
from feincms... Page
class MyPageAdmin(PageAdmin):
def __init__(self, *args, **kwargs):
'monkey business'
super(MyPageAdmin, self).__init__(*args, **kwargs)
admin.site.unregister(Page)
admin.site.register(Page, MyPageAdmin)
This won't work because feincms checks for a completely loaded django instance. A verbose solution would probably be not to load the page module at all, and either override the page model object or admin, e.g.:
from feincms... PageAdmin
class MyPage(Page):
objects = CustomManager()
admin.site.register(MyPage, PageAdmin)
The documentation states it is possible to setup your own page module in a similar way, but it seems a lot of configuration for a simple requirement.
Is there any easier way to override the admin queryset or model admin for feincms modules?
PageAdmin
work? – Fazio