improve query for content_panes with prefetch and select related.
a bit correction
fixing syntax error