'uses the query() method to define the contents of the
listing and renders the page self.render_cls(..).render() with
the listing as contents'

def build_listing(self, num, after, reverse, count, sr_detail=None, **kwargs):

    self.num = num
    self.count = count
    self.after = after
    self.reverse = reverse
    self.sr_detail = sr_detail
    if (c.site.login_required and (not c.user_is_loggedin)):
        raise UserRequiredException
    self.query_obj = self.query()
    self.builder_obj = self.builder()
    if (after and (not self.builder_obj.valid_after(after))):
        listing_name = self.__class__.__name__
        g.stats.event_count('listing.invalid_after', listing_name)
        self.abort403()
    self.listing_obj = self.listing()
    content = self.content()
    return self.render_cls(content=content, page_classes=self.extra_page_classes, show_sidebar=self.show_sidebar, show_chooser=self.show_chooser, show_newsletterbar=True, nav_menus=self.menus, title=self.title(), infotext=self.infotext, infotext_class=self.infotext_class, robots=getattr(self, 'robots', None), **self.render_params).render()
