>
> I've taken a glance at it, but the Overview section alone is ~12,000 words 
> - that's a *lot* given it's a technical manual rather than a light bedtime 
> read. Instead I'm working through the examples because I learn better that 
> way: http://www.web2py.com/examples/default/examples
>

You don't have to read it all, but go through the beginning. This 
section<http://web2py.com/books/default/chapter/29/03/overview#Simple-examples>should
 help. Also have a look at 
http://web2py.com/books/default/chapter/29/04/the-core#Workflow and 
http://web2py.com/books/default/chapter/29/04/the-core#Dispatching. 
 

> in the first case, it is saying there is no index/index.html view in the 
>> /views folder
>
> I disagree. It's saying "invalid view". That *could* mean that it doesn't 
> exist, but from a English-language perspective, it could mean countless 
> other things as well including that there's something wrong with it. HTTP 
> has header response codes - if it's missing it ideally would return a 404. 
> If there's something wrong it should be returning a 500, etc.
>

It is in fact returning a 404.

To understand how and where to create views and controllers, you should 
>> peek at the documentation for a few minutes.
>
> I have and I believe I understand how to.
>

Not yet. Read through the above links.
 

> The reason I tried * /views/index* is because that's what Annet said (or 
> how I read her post anyway).
>

No, she said your view should be in /views/index/index.html -- that's a 
file path, not a URL.
 

> So, I've now started again. Process:
> 1) "New Simple Application" - Name - "Test2"
> 2)  "Manage"  -> Edit
> 3) Create a controller called *controller.py*. Using the editor I put 
> this in it (from example 3):
> def hello3():
>     return dict(message=T("Hello World"))
> 4) Create a view called *view.html*, put this in it:
>

No, the view must have the following file path /views/[name of the 
controller]/[name of the function].extension. It's in the documentation. 
You can use an alternative name and location, but then you have to tell 
web2py by specifying response.view.
 

> <h1>hello world</h1>
> <h2>{{=message}}</h2>
> 5) Go to this URL:
> http://localhost:8000/test2/controller/hello3
>
> And it works.
>

Not quite. It is ignoring your view. In case the view isn't found, if you 
are using the scaffolding app and on localhost, it will fall back to the 
/views/generic.html view. 

I thought deleting everything was OK based on a post I read by Massimo here 
> somewhere.
>

Yes, you can delete everything and start from scratch, but you need files 
named and located according to the proper conventions.

Again, if you just want to play around, start with the scaffolding app and 
make some tweaks or follow through the examples in the Overview chapter. If 
you want to delete everything and start from scratch, you'll have to 
understand better how things work, and that's simply going to require doing 
some reading.

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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to