Exemple #1
0
 def orders(self):
     import cStringIO
     from lxml import etree
     self.form['order_id'] = 0
     f = open('/usr/local/fshop/ht_admin/templates/order_new.xsl')
     _spec = f.read()
     f.close()
     xslt = cStringIO.StringIO(_spec)
     parser = etree.parse(xslt)
     result = etree.XSLT(parser)
     return result(E.R(self.E_data()))
 def access_denied(self):
     xml = E.R(
         self.E_page(),
         self.E_user(),
         self.E_product(),
         # Должны выполнятся позже всех.
         self.E_results(),
         self.E_errors(),
     )
     self.resp.status_int = 500 # FIXME
     self.xsl_exec('', '__root__.xsl', xml)
     self.xsl_fillbind()