The purpose of a view is that or converting the output of a controller action (a python function) into HTML.
you can have views/default/index.html containing only "<h1>hello world</h1>" but you also need a file controllers/default.py containing "def index(): return dict()" On Sunday, 5 January 2014 09:52:42 UTC-6, pythonic...@gmail.com wrote: > > I'm starting at the start with trying to understand the structure of > web2py and how it all fits together (reading books doesn't work for me). > > To that end I've created a view, the entire content of which is: > >> <h1>hello world</h1> > > > This is in a view file called "index.html" - I'm not extending anything, > that's the entirety of the file. I am requesting it via this URL: > > http://localhost:8000/test/index.html (the project is called "test") > I also tried: > http://localhost:8000/test/default/index.html > But that complains "invalid controller (default/index)" - makes sense, > there is no controller. > > So, two questions come up: > > a) What am I doing wrong? This seems like it's a simple as it gets. > > b) How do I get web2py to give me useful debugging information that I can > pursue? If I get "invalid request" every time I make a mistake this is > going to take forever. > > Thanks. > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.