On Monday, July 7, 2014 6:29:05 AM UTC+7, Bazida wrote:
>
>
> - *Question one:*
>
> <h1>Hello {{=request.vars.visitor_name}}</h1>
>
> What is the purpose of vars here, what it does.
>
>
> request.vars: a gluon.storage.Storage object containing all request
parameters.
ref:
http://web2py.com/books/default/chapter/29/04/the-core#request
>
> - *Question two:*
>
> default/first.html
>
> What is the point of default here. Why we have to declare it everytime. Can't
> we just create first.html.
>
>
'default' is the controller name provided by web2py, you can change the
controller file name into whatever you like. you don't have to declare the
controller name everytime, it depends on your logic programming, so the
answer is already inside you, wheter you want create 1 controller name :
'default' with a lot of function, or you want to make a lot of controller
with fewer function, your choice.
and first.html is the output of the function defined on the controller.
ref :
http://web2py.com/books/default/chapter/29/04/the-core#Dispatching
>
> Thank you for taking time to answer.
>
>
please spend some time read the book.
best regards,
stifan
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.