Anthony <[email protected]> wrote: > [-- multipart/alternative, encoding 7bit, 161 lines --] > > [-- text/plain, encoding 7bit, charset: UTF-8, 77 lines --] > > > > > > > > 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. > OK, it just isn't clear when you go straight to the simple examples page.
> > > ... 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. > Yes, I'm beginning to realise that, however I was expecting 'simple examples' to allow me to create something that worked that I could look at to see how it all hangs together. The book *does* have a Simple Examples section in Chapter Three and that's maybe where I should have started. I was misled by the Simple Examples link from the web site. > > > 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. > OK, would be nice to be told that. :-) > > > 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). > OK > > > 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. > Yes, OK, I'm now reading the book. I think there should be stronger pointers towards it. :-) -- Chris Green · -- 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.

