[web2py] Re: Executing controller- and function-specific models in web2py shell

2012-01-15 Thread Anthony
When running the shell, the app can actually be in a/c/f format, so try: $> python web2py.py -S myapp/acontroller -M That will execute the acontroller.py controller when starting up the shell, so it will also execute any acontroller specific models as well. If you specify myapp/acontroller/afun

Re: [web2py] Re: Executing controller- and function-specific models in web2py shell

2012-01-15 Thread Bruno Rocha
I guess he wants to exec a submodel, not a controller! On Sun, Jan 15, 2012 at 8:54 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > If you do > > execfile('applications/app/controllers/default.py') > > you will expose them all. The problem is that they may have logic like > @auth.req

[web2py] Re: Executing controller- and function-specific models in web2py shell

2012-01-15 Thread Massimo Di Pierro
If you do execfile('applications/app/controllers/default.py') you will expose them all. The problem is that they may have logic like @auth.requires_login() decorators which may prevent you from calling those functions. If you want to do this better you should define make the controllers delegate