[web2py] Re: Newbie Tutorial Confusion

2012-01-31 Thread llanitedave
You hit the nail on the head. So I'm really just misunderstanding the tutorial. And of course, looking at the code now it makes sense, because it only redirects to the second page if there is actually a value in "visitor_name". Now I get it. Thanks, folks. It's a self-facepalm. But there will

[web2py] Re: Newbie Tutorial Confusion

2012-01-31 Thread Benjamin
Oups you're right. Now I remember what I didn't understand at this point, and probably what the OP was expecting. The book says : " Note that if the "second" action is ever called before a visitor name is set, it will display "Hello anonymous" because session.visitor_name returns None. " What t

[web2py] Re: Newbie Tutorial Confusion

2012-01-31 Thread Anthony
> > I'm pretty sure the first should be like this : > > > > ** > > def first(): > if request.vars.visitor_name: > session.visitor_name = request.vars.visitor_name > redirect(URL('second')) > return dict(form=form) > > ** > > NOTICE THE return dict(fo

[web2py] Re: Newbie Tutorial Confusion

2012-01-31 Thread Benjamin
Hello again, I'm pretty sure the first should be like this : ** def first(): if request.vars.visitor_name: session.visitor_name = request.vars.visitor_name redirect(URL('second')) return dict(form=form) ** NOTICE THE return dict(form=form), I think it'

[web2py] Re: Newbie Tutorial Confusion

2012-01-31 Thread Benjamin
Hi, I did the tutorial of the pdf last week (newest pdf of december) and there is a missing step exactly at this spot of the PDF. (or actually a "not so clear change which needs to be made to run the tutorial without any issue"). I didn't know of the google groups at that time so I didn't post the

[web2py] Re: Newbie Tutorial Confusion

2012-01-31 Thread Anthony
Note the following line: if request.vars.visitor_name: That means it will only store the value in the session and do the redirect if "visitor_name" is in request.vars. If you're not submitting a visitor name, then that variable will not be in request.vars, and the conditional branch in the co