Exemple #1
0
 def render (values):
     if isinstance (values.get ('article', None), Exception):
         self.set_status (values ['article'].code)
         
     if options.debug:
         for k, v in values.items ():
             if isinstance (v, Exception):
                 logging.error ('Failed to load document(s) for "%s": "%s"' % (k, v))
         
     t = Template ()
     values ['_pageinfo'] = pageinfo
     self.write (t.render (options.index, vars=values))
     self.finish ()
Exemple #2
0
 def render (values):
     t = Template ()
     values ['_pageinfo'] = pageinfo
     self.write (t.render (options.index, vars=values))
     self.finish ()