I read your question again and think yamandu had already answered your question. There are "if ... elif ... else ..." in the index.html, which you may need to have a look. For your case, index.html worked similar to generic.html, but doesn't mean that the generic.html is used.
On Thursday, March 14, 2013 11:38:45 PM UTC-4, Sarbjit singh wrote: > > Let me explain : > > As per that example, we create a new appliance which means > default/index.html does exists and we are modifying controllers/default.py > index function as shown in original post. So my question is if > default/index.html does exist, then why generic.html is being used? > > hope this clears my doubt > > -Sarbjit > > > On Thursday, March 14, 2013 9:04:31 PM UTC+5:30, Mark wrote: >> >> 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

