If you don't have a view (such as index.html), the generic view 
(generic.html) will be used. Isn't it clear?

On Thursday, March 14, 2013 7:54:38 AM UTC-4, Sarbjit singh wrote:
>
> In the 5th edition of web2py manual, for the example of images app, I have 
> one doubt :-
>
> As per that app code, we create db in models (db.py) and then we write 
> some code in controller (default.py) as :-
>
> def index():
>    images = db().select(db.image.ALL, orderby=db.image.title)
>    return dict(images=images)
>
> In the documentation it is written :-
>
> If you do not write a view, the dictionary is rendered by 
> "views/generic.html" and a call to the index action would look like this:
>
> It seems to work like this only but my question is when we create a new 
> app as specified in the manual. default/index.html is already present 
> (index name is same as my function name in default.py), then why 
> generics.html is being used and not index.html which is already present. In 
> first example, index.html is seemed to be used.
>
> Thanks
> Sarbjit
>

-- 

--- 
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