With the -S command line option, you can optionally specify a controller, and even a function.
python web2py.py -S akb/default -M -N will give you an environment with the default.py controller exposed, and presumably should run the /models/default/db.py model file. You can also specify -S akb/default/index to run the index function, but in that case you won't remain in the shell -- it will just run the function and return. Anthony On Tuesday, July 31, 2012 8:59:52 AM UTC-4, Johann Spies wrote: > > On Tuesday, 17 July 2012 19:46:02 UTC+2, Massimo Di Pierro wrote: >> >> I remind the readers we have conditional models: >> >> models/db.py (runs for every action) >> models/default/db.py runs (runs only for actions in >> controllers/default.py) >> models/default/index/db.py runs (runs only for action index() in >> controllers/default.py) >> >> > How do I access those models from the commandline? Do I have to import it > manually? > > When I use the normal startup like > > python web2py.py -M -N -S akb > > db.tables does not show the table defined in models/db/xxx > > Regards > Johann > --