Exemplo n.º 1
0
 def getPage(self, page, params = None):
     """ Retrieves and renders the specified page
     """
     try:
         page = mydjango.render( page, params )
         return (page,200)
     except:
         try:
             page = mydjango.render( 'not_found.html' , params )
             return (page,404)                
         except:
             logging.error('Default page "not_found.html" error')
     return (None,500)
Exemplo n.º 2
0
 def _render_content(self, content, code):
     
     (logx_href, logx_title) = self._getlogx()        
     params = { 'content':    content,
                'logx_href':  logx_href,
                'logx_title': logx_title,
                'is_remote':  IS_REMOTE
               }
     
     res = mydjango.render( self._base_tpl, params )       
     self._output(res, code)