comparison libervia/server/pages.py @ 1186:352865f4a268

server: added a generic way to have notification messages in pages
author Goffi <goffi@goffi.org>
date Sun, 26 May 2019 22:16:07 +0200
parents 7d6c0e5d5f34
children dab7a2b151ea
comparison
equal deleted inserted replaced
1185:7d6c0e5d5f34 1186:352865f4a268
1218 1218
1219 # if confirm variable is set in case of successfuly data post 1219 # if confirm variable is set in case of successfuly data post
1220 session_data = self.host.getSessionData(request, session_iface.ISATSession) 1220 session_data = self.host.getSessionData(request, session_iface.ISATSession)
1221 if session_data.popPageFlag(self, C.FLAG_CONFIRM): 1221 if session_data.popPageFlag(self, C.FLAG_CONFIRM):
1222 template_data[u"confirm"] = True 1222 template_data[u"confirm"] = True
1223 notifs = session_data.popPageNotifications(self)
1224 if notifs:
1225 template_data[u"notifications"] = notifs
1223 if session_data.locale is not None: 1226 if session_data.locale is not None:
1224 template_data[u'locale'] = session_data.locale 1227 template_data[u'locale'] = session_data.locale
1225 if self.vhost_root.site_name: 1228 if self.vhost_root.site_name:
1226 template_data[u'site'] = self.vhost_root.site_name 1229 template_data[u'site'] = self.vhost_root.site_name
1227 1230