On Jul 10, 2011, at 12:48 PM, Luis Goncalves wrote:
> more thoughts:
> 
> could I do something like:
> define a shared global variable  session.version 
> = -1 initially, signifying no choice made
> ? use a callback that gets executed before the controller that responds to 
> the request
> if session.version >-1:
>      let the responding controller do its thing
> else:
>      if controller allowed to run:
>           let the controller run
>      else:
>           redirect to 'please choose version'
> Is it possible to implement such a "callback"???
> 
> (or is this not the right/best way to achieve the functionality I need?)

Anthony's idea of doing it in a model sounds good.

Or you could write a decorator, along the lines of @auth.requires_login(), that 
performed the tests you need.

Reply via email to