Thanks, Bruno, I will try this. I am curious to learn more. Could you
spend a moment to explain why it works this way? For instance, why
can't the module import current and set current.auth=auth?

On Mar 6, 2:45 pm, Bruno Rocha <[email protected]> wrote:
> in model after all (in the last line of the last model) include.
>
> from gluon import current
> current.auth = auth
>
> so in module you will have access to current.auth.
>
> http://zerp.ly/rochacbruno
> Em 06/03/2012 03:40, "weheh" <[email protected]> escreveu:
>
>
>
>
>
>
>
> > I'm finally migrating many, possibly all model functions to modules,
> > where they belong. But one of my functions tests auth.is_logged_in(),
> > which can not be found from within modules. Nor is it a
> > current.<whatever>.<whatever>. I've done a bit of digging but haven't
> > found the answer, yet. If someone knows how to do it, I'd appreciate a
> > pointer. Thanks.

Reply via email to