In principle, that should work. However you say you're new to this so some
basic scenarios to check below.
1) Do you have a def second() controller where the variable is being
overridden or deleted? Or session.forget() is called?
2) Are you navigating to /default/first?visitor_name=phil (to cause the
variable to be set in request.vars in on that page) and being redirected
successfully to second? Note that if request.vars.visitor_name is not
passed in the url it assigns python None to session.visitor_name, which
explains why you don't see it later.
3) Does your browser have cookies enabled and is accepting cookies from
your dev server? The session id is stored in the cookie and if that is not
being passed back, then each page hit is a new session (with balnk session
variables).
4) Try putting {{=response.toolbar()}} into your html pages. This
generates a debug toolbar with the session and request contents in there
(plus some other useful stuff)... might help troubleshoot.
HTH,
Jose
--
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 the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/ed94f398-1f34-47b0-862a-4a2cb7b6fa85%40googlegroups.com.