diff 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
line wrap: on
line diff
--- a/libervia/server/pages.py	Sun May 26 22:14:23 2019 +0200
+++ b/libervia/server/pages.py	Sun May 26 22:16:07 2019 +0200
@@ -1220,6 +1220,9 @@
         session_data = self.host.getSessionData(request, session_iface.ISATSession)
         if session_data.popPageFlag(self, C.FLAG_CONFIRM):
             template_data[u"confirm"] = True
+        notifs = session_data.popPageNotifications(self)
+        if notifs:
+            template_data[u"notifications"] = notifs
         if session_data.locale is not None:
             template_data[u'locale'] = session_data.locale
         if self.vhost_root.site_name: