1. Re. PS2: Thanks for the info on the public functions. Sorry about not 
attaching a complete app; I thought that really wouldn't have been 
reasonable on my part. Also, it requires db access, etc. I'll try to repro 
the problem on a smaller scale.

2. Re. PS1: Please forgive my ignorance/incompetence. When I build my form 
I have values in it (taken from the db), so building the form at the start 
means I have to go to the db to retrieve those values (as in, 
"value=retVals.subject"). I'm trying to avoid doing that on a POST. Or 
should I build a 'valueless' form at the start, and add values only if I'm 
not handling the POST?

3. Given that your example works fine, what sorts of things should I look 
for in my app that might cause the session to be recreated?

Thanks.

On Wednesday, October 31, 2012 2:32:21 PM UTC-6, Niphlod wrote:
>
> on my pc the session files are not recreated.
>
> session values are saved even if you redirect (just to test it out)
>
> @auth.requires_login()
> def send_info():
>    setupMeetInSession()
>    form = dict()
>    session.customvar = True
>    redirect(URL('send_info2'))
>    return dict(form=form)
>
> @auth.requires_login()
> def send_info2():
>     return dict(session=session)
>
>
> def setupMeetInSession():
>    session.meetInfo = session.meetInfo or Storage()
>    return
>
> hitting the page send_info redirects you to send_info2 that holds both 
> meetInfo and customvar values.
>
> PS1: the reason behind defining the form without accepts() and recatching 
> all the post_vars on the beggining of the function is a mistery to me
> PS2: functions without params are exposed to the public. If this is an 
> internal function you should avoid someone ending in setupMeetInSession 
> while navigating with a default parameter, if that function is never going 
> to be exposed to the public
>
>
> def setupMeetInSession(fake=True):
>    session.meetInfo = session.meetInfo or Storage()
>    return
>
> BTW for everyone: try to attach something that users passing by (as me) 
> can reproduce. Here it's missing 3 controllers functions, 3 inner 
> functions, the default values for retval, the concatenation of a string 
> with a possibly none request.args(0), etc.
> Having to hack your examples to reproduce may end up in not reproducing 
> the behaviour is happening on your development machine just because the bug 
> is originated on the hacked parts.
>
>

-- 



Reply via email to