You will need to keep state in some place to know if the user already passed
in the previous action.

@auth.requires_login() #if you need the user to be logged in
> def a():
>
           session.lastsee = 'a'

>     # some code
>     if form.accepts(request.vars, session):
>         redirect(URL('b'))
>     return dict(form=form)
>
> def b():
>
           if session.lastsee and session.lastsee == 'a':
               session.lastsee = 'b'
           else:
               redirect(URL('a'))


>     # some code
>     if form.accepts(request.vars, session):
>         redirect(URL('c'))
>     return dict(form=form)
>
> def c():
>     return "**** c *****"
>
> a, b and c have their own views. I do not want to allow any user to start
> at function b or c. Everybody has to start at a.
> I think, this problem could be solved using a decorator, but I could not
> find how.
>
> Regards, Martin
>
>


-- 



--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
[ Aprenda a programar: http://CursoDePython.com.br ]
[ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
[ Consultoria em desenvolvimento web: http://www.blouweb.com ]

Reply via email to