> > > The first (minor) problem is that it says something like "In > controller: simple_examples.py" above each example. On my system > simple_examples.py is in > <web2py>/applications/examples/controllers/simple_examples.py > which isn't quite what it says. >
Not sure what you mean. According to the documentation, controller files go in the application's /controllers folder, and that is where the simple_examples.py controller file is found. > ... but more importantly what do I do to actually produce the pages > the examples are supposed to create? > The examples are already created in the "examples" application. There are several controllers as well as a set of views associated with the various actions. If you wanted to create them from scratch, you could just duplicate the code from the "examples" app in your own app (i.e., create your own controller and view files and fill them in with the relevant code). Rather than trying to learn everything from the examples page, you should probably proceed to the book. > Then (though this is maybe trying to run before I can walk as I can't > really understand the simplest examples) when you get down to the > database examples (which is what I'm particularly interested in) there > are various oddities:- > > The 'try it here' link suddenly disappears, so I can't see what's > supposed to happen. > The database examples don't have links because we don't want to allow database writes in the online examples. You can try them in your local installation, though. > The directory <web2py>/applications/examples/databases is empty > You don't have to worry about that. The first time a request is made to the app and the model files are executed, some files will be created there (assuming migrations are not turned off). The /databases folder stores metadata used for migrations (and is typically where the SQLite database file is stored when using SQLite). > There are two db.py files in my installation (I think one is to do > with the admin system, but still it's confusing) > Every application has a separate folder within the /applications folder, and each application has its own models, views, and controllers, etc. So yes, the admin app has its own db.py model file. Again, you're not intended to understand everything by reviewing that single examples page and look at the folders -- please read the book. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

