Is there a way to find a page (query) which contains an specific content type.
Lets say I have a page (logout) with content type LogoutFormContent
.
How can I find the page(s) that has LougOutFormContent as content type.
I tried to do this:
page = Page.objects.filter(logoutformcontent_set=True)
which generates the following query
SELECT * FROM `page_page` INNER JOIN `page_page_logoutformcontent`
ON (`page_page`.`id` = `page_page_logoutformcontent`.`parent_id`)
WHERE (`page_page_logoutformcontent`.`id` = 1)
This is almost correct except page_page_logoutformcontent.id = 1
???