comparison libervia/server/pages.py @ 1205:92d0a2b785fd

pages: show rendered html on failed renderAndUpdate
author Goffi <goffi@goffi.org>
date Sun, 14 Jul 2019 17:18:48 +0200
parents 251eba911d4d
children 584e29d9510a
comparison
equal deleted inserted replaced
1204:a2df53dfbf46 1205:92d0a2b785fd
1524 append: append rendered element to selected element 1524 append: append rendered element to selected element
1525 """ 1525 """
1526 template_data = request.template_data.copy() 1526 template_data = request.template_data.copy()
1527 template_data.update(template_data_update) 1527 template_data.update(template_data_update)
1528 html = self.renderPartial(request, template, template_data) 1528 html = self.renderPartial(request, template, template_data)
1529 request.sendData(u"dom", selectors=selectors, update_type=update_type, html=html) 1529 try:
1530 request.sendData(
1531 u"dom", selectors=selectors, update_type=update_type, html=html)
1532 except Exception as e:
1533 log.error(u"Can't renderAndUpdate, html was: {html}".format(html=html))
1534 raise e
1530 1535
1531 def renderPage(self, request, skip_parse_url=False): 1536 def renderPage(self, request, skip_parse_url=False):
1532 """Main method to handle the workflow of a LiberviaPage""" 1537 """Main method to handle the workflow of a LiberviaPage"""
1533 1538
1534 # template_data are the variables passed to template 1539 # template_data are the variables passed to template