web2py -S welcome, for example, will give you a python interpreter with the
current web2py "environment".  If you add '-M', then the models for the
application will also be run.  If you have ipython installed on your system,
then the ipython interpreter will be run (otherwise just the python
interpreter) and you will have the completion facilities of ipython, e.g.
db.[TAB] will show you what is defined for db (but so will dir(db)).

This lets you see the output of various web2py statements in the context of
your app, so is partly a debugging tool, partly a development tool (does it
return a record or a list of records?).

To create an application without the web interface, you basically copy an
application into the applications directory - for example, make a copy of
welcome, and name it "my_app" (or whatever).

Next, you update the model and controller files, and (as needed) view
files.  In the first, simplest case, you add table definitions to
my_app/models/db.py (db.py can be any name - there is nothing special about
it; all files in models are read for each request).  Then you add controller
functions in my_app/controllers/default.py.  For each controller which you
want something different from default view, you would add a correspondingly
named file in views, e.g. for index() in controllers/default.py, you could
create a file views/default/index.html.

Those are the basics for creating apps w/o using the web interface.

On Fri, May 22, 2009 at 8:47 AM, cesmiga <cesm...@gmail.com> wrote:

>
> All:
>
> I'm looking for documentation about how to create a web2py application
> from the shell.  Does anyone have information on this?  Also, does
> anyone have information about the Web2Py shell and/or DAL.
>
> Thank you,
> Christopher
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to