Thanks a lot Anthony. It'll be perfect.
On Saturday, November 15, 2014 3:28:15 PM UTC+5:30, T.R.Rajkumar wrote:
>
> In book chapter 3 overview the following is given to restrict access to
> second page.
>
> if not request.function=='first' and not session.visitor_name:
> redirect(URL('first'
request.function is always going to be the name of the function that has
been requested -- that's what it is for.
On each request, why don't you just do something like this in a model:
session.last_page = session.this_page or None
session.this_page = (request.controller, request.function)
def r
@Anthony Yes the session var is OK. But I would like to see that the second
page can be visited only after the first page. Keeping the session var
flags can be troublesome if we have hundreds of pages and the same session
var gets set in some other page. Is their a way out? The request.function
So what is the problem? It sounds like it is working as expected -- with
the "not session.visitor_name" condition, you get a redirect if no name has
previously been entered on the first page, correct? Are you observing
something different? Note, once you have visited the first page, you can
the
I am able to visit the second page directly without visiting the first page
if I have only the request.function. If I add the session var condition
then it restricts.
On Saturday, November 15, 2014 3:28:15 PM UTC+5:30, T.R.Rajkumar wrote:
>
> In book chapter 3 overview the following is given to
I believe the book is correct. Are you sure the redirect doesn't work?
request.function should be "second" if that was the requested function. The
redirect occurs after the request is parsed.
On Saturday, November 15, 2014 4:58:15 AM UTC-5, T.R.Rajkumar wrote:
>
> In book chapter 3 overview the
6 matches
Mail list logo