From 8c5540a79e5752796588791a1fe9e417fef56010 Mon Sep 17 00:00:00 2001 From: Massimiliano Date: Fri, 23 Aug 2024 12:44:25 +0200 Subject: [PATCH 1/2] Update Flash Fixture doc Updated fash fixture doc to actual behavior as https://github.com/web2py/py4web/issues/912 --- docs/chapter-06.rst | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/chapter-06.rst b/docs/chapter-06.rst index f179c1c7..d77b9e40 100644 --- a/docs/chapter-06.rst +++ b/docs/chapter-06.rst @@ -345,13 +345,7 @@ and in the template: .. code:: html - ... -
- ... - - [[if globals().get('flash'):]] - - [[pass]] + By setting the value of the message in the flash helper, a flash variable is returned by the action and this triggers the JS in the From 2009eff06e4b5db0187ea70e7bcd76796d728fc4 Mon Sep 17 00:00:00 2001 From: Massimiliano Date: Sun, 25 Aug 2024 15:17:53 +0200 Subject: [PATCH 2/2] Flash fixtures docs Working example from python and js --- docs/chapter-06.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chapter-06.rst b/docs/chapter-06.rst index d77b9e40..718cd231 100644 --- a/docs/chapter-06.rst +++ b/docs/chapter-06.rst @@ -363,7 +363,7 @@ The client can also set/add flash messages by calling: :: - utils.flash({'message': 'hello world', 'class': 'info'}); + Q.flash({'message': 'hello world', 'class': 'info'}); py4web defaults to an alert class called ``info`` and most CSS frameworks define classes for alerts called ``success``, ``error``,