Exemplo n.º 1
0
    def render(self, request):
        """render page"""

        logger = logging.getLogger(__name__)
        logger.debug('rendering page')

        if self.title or self.subtitle or self.actions or self.search:
            full_page = Component(PageHeader(page=self), self.content)
        else:
            full_page = Component(self.content)
        self.content = full_page.render()

        zoom.render.add_helpers(
            zoom.forms.helpers(request),
            self.helpers(request),
        )

        template = request.site.get_template(self.template)

        return HTMLResponse(template)
Exemplo n.º 2
0
    def render(self, request):
        """render page"""

        logger = logging.getLogger(__name__)
        logger.debug('rendering page')

        if self.title or self.subtitle or self.actions or self.search:
            full_page = Component(PageHeader(page=self), self.content)
        else:
            full_page = Component(self.content)
        self.content = full_page.render()

        self.theme = self.kwargs.get('theme', zoom.system.site.theme)
        self.theme_uri = '/themes/' + self.theme

        zoom.render.add_helpers(
            zoom.forms.helpers(request),
            self.helpers(request),
        )

        template = zoom.tools.get_template(self.template, self.theme)

        return HTMLResponse(template)