Thanks, I'm on example 3 which is the one this is based on. My issue isn't 
that even something this simple isn't working and I don't know why.

In fact, I've already tried the controller thing (example 3) and got the 
same error (same error). So  I went back to basics and converted to 
"<h1>hello world</h1>". But that doesn't work either.

So the more complex example is:

My controller is called index.py:

> def index():
> return dict(message=T("Hello World"))


And now I've edited my view to:

> <h1>hello world</h1>
> <h2>{{=message}}</h2>


The same url is giving me the same error.

So I'm stuck with my original two questions:

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.


On Sunday, January 5, 2014 4:09:25 PM UTC, Massimo Di Pierro wrote:
>
> 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.

Reply via email to