Flash messages not showing correctly

58 views
Skip to first unread message

Krzysztof Socha

unread,
May 3, 2016, 11:22:07 AM5/3/16
to web2py-users
I have issues with showing "flash"-type messages recently. First I could not get them to show at all. I updated several files in my application based on the recent version of web2py (R-2.14.5), such as web2py.js, web2py-ajax.html, and the like.

Now it shows the flash message, but the formatting is all wrong. It just shows it on top of the page. Some digging revealed that the flash messages are put in a DIV with class="flash", while web2py.js is expecting class="w2p_flash". Anyone has an idea why it is like that and what to do to fix it?

Krzysztof.

Anthony

unread,
May 3, 2016, 11:31:52 AM5/3/16
to web2py-users
In layout.html, have you tried changing the class of the flash div from "flash" to "w2p_flash"?

Anthony

Krzysztof Socha

unread,
May 3, 2016, 11:47:26 AM5/3/16
to web2py-users
Worked! Thanks!

BTW: I keep running into issues when updating old web2py applications to new releases of web2py... Is there a recommended way of doing it? It is not very clear which files in my application folder should be changed/replaced/updated/edited when updating web2py.

Krzysztof.

Anthony

unread,
May 3, 2016, 11:58:53 AM5/3/16
to web2py-users
For the most part, you would replace the files in the scaffolding app that are not customizable (i.e., web2py.js, web2py_ajax.html, appadmin.py, appadmin.html, the generic views, etc.). In some cases, you may also need to tweak layout.html, but that depends on how much of its original functionality you retained.

Anthony

Krzysztof Socha

unread,
May 4, 2016, 8:27:31 AM5/4/16
to web...@googlegroups.com
Thanks... It is just this 'tweaking' that I am worried about... It is not always easy to test every functionality of the page to make sure that I have done all the tweaking necessary...

Thanks anyway.
Krzysztof.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/QaCC_IaBZ5A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages