Re: [web2py] Re: flash message gets lost

2017-05-24 Thread Yebach
I do not know i it is a bug or smth but if I do not use if form.process().accepted: and just use if form.accepted: Then add_organization(form, userid) is not triggered and also if I put some prints in it I cannot see them in my PyCharm console, while, now this is interesting,

Re: [web2py] Re: flash message gets lost

2017-05-11 Thread Vid Ogris
OK so changing if form.process().accepted to if form.accepted works for user registers, if I remove it from if request.args(0)=='profile': block, it is not triggered. As far as flash message goes the flash works after user updates profile and everywhere else on my page but after registration it

Re: [web2py] Re: flash message gets lost

2017-05-10 Thread Anthony
On Wednesday, May 10, 2017 at 3:14:08 AM UTC-4, Yebach wrote: > > How do you suggest I arrange my controller for user? > That's up to you, but for starters, maybe instead of putting all the logic in "if" blocks, make use of the Auth callback settings, such as auth.settings.register_onaccept.

Re: [web2py] Re: flash message gets lost

2017-05-10 Thread Vid Ogris
How do you suggest I arrange my controller for user? 2017-05-09 16:17 GMT+02:00 Anthony : > No, you should still set session.flash in your controller code. However, > your view should have {{=response.flash}}, as the framework will move the > value of session.flash to

Re: [web2py] Re: flash message gets lost

2017-05-09 Thread Anthony
No, you should still set session.flash in your controller code. However, your view should have {{=response.flash}}, as the framework will move the value of session.flash to response.flash after the redirect. Also, as already noted, you cannot define form=auth() and then subsequently call

Re: [web2py] Re: flash message gets lost

2017-05-09 Thread Vid Ogris
Hello Form is defined as form = auth() Changing session.flash to response.flash still does not work after user This is my whole user code def user(): form = auth() if request.args(0)=='profile': #uporabnikov Id uid = auth.user_id #preberem podatke za tega

[web2py] Re: flash message gets lost

2017-05-08 Thread Anthony
On Monday, May 8, 2017 at 5:08:59 AM UTC-4, Yebach wrote: > > Flash is show on my index page so the position class="flash">{{=session.flash > or ''}} is ok > I just put session.flash('Some random text') in my index function and it > works > session.flash is not intended to work that way. You

[web2py] Re: flash message gets lost

2017-05-08 Thread Yebach
Flash is show on my index page so the position {{=session.flash or ''}} is ok I just put session.flash('Some random text') in my index function and it works But after registration the message is not shown My code for user registration in index.py user if request.args(0) == 'register':

[web2py] Re: flash message gets lost

2017-05-07 Thread Anthony
Are you successfully able to show any flash messages (i.e., simply set response.flash within any action and see if it shows up on the page)? Is the appropriate DIV in the layout.html? Note, by the time you are in the index function, session.flash is not expected to be there any longer, as the