From 7e1a46eccd70252806ffb516ae73296a15b81f16 Mon Sep 17 00:00:00 2001 From: Massimiliano Date: Tue, 27 Aug 2024 04:07:46 +0200 Subject: [PATCH] Updated js Flash Fixture example (#914) * Update Flash Fixture doc Updated fash fixture doc to actual behavior as https://github.com/web2py/py4web/issues/912 * Flash fixtures docs Working example from python and js --- docs/chapter-06.rst | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/chapter-06.rst b/docs/chapter-06.rst index 85ad3a63..c4f56877 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 @@ -369,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``,