I am very new to web2py, can you please explain it more?
Thanks,
Sarbjit
On Thursday, March 14, 2013 6:15:55 PM UTC+5:30, yamandu wrote:
>
> Probably you are confused because of this code present in index.html:
>
> {{elif 'content' in globals():}}
> {{=content}}
> {{else:}}
> {{=BEAUTIFY(response._vars)}}
> {{pass}}
>
> If theres no content it renders the BEAUTIFY(response._vars) just like the
> generic view, so its not the generic view being rendered but a similar view.
>
>
>
> 2013/3/14 Sarbjit singh <[email protected] <javascript:>>
>
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Att.
>
> Carlos J. Costa
> Cientista da Computação
> Esp. Gestão em Telecom
>
> EL MELECH NEEMAN!
> אָמֵן
>
>
--
---
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.