It should work if you run web2py in shell mode and run the models,
this will define auth.

python web2py.py -S myapp -M

then do the import etc.

I just tried it on my own app, worked ok. The __init__.py had to be
there (it was empty).

Ron

On Nov 25, 1:58 am, selecta <[email protected]> wrote:
> Is it possible to access the docstrings of controller functions?
> i tried the following:
>
> I added __init__.py to the controllers folder
> and wrote
> import applications.myapp.controllers.mycontroller
> print dir(applications.myapp.controllers.mycontroller)
>
> however this gives me
> ...
>     @auth.requires_login()
> NameError: name 'auth' is not defined
>
> because I use the @auth decorators
>
> is there another way?

Reply via email to