On Apr 23, 7:19 am, "lameck.kassana" <[email protected]> wrote:
> hi I am newbie in web2py .

welcome aboard.

> I am unable to to display my view . I have
> my control called greet.py and also I have viewer greet.html
>
> you can see the content as
>
> ----this is controller greet,py
> # coding: utf8
> # try something like
> def index():
>     return dict(message="hello from greet.py")
>
> def greet():
>    # return dict(greet=('hello laskk'))
>    session.counter=(session.counter or 0)+1
>    return dict(greet="hello guest",counter=session.counter)
>
> -------------------------------------here it comes my viewl
> --------------------------
> <html>
> <head></head>
> <body> <h1>{{=greet}} you are the  {{=counter}} visitor </h1>
> </body>
> </html>

Note that it is a session counter not a site counter.

> ---but when i am passing the url  http://127.0.0.1:8000/gatepass/greet/greet/
>  I only see the values of variable and I don't see the rendered result
> page.
> N.B my application is called gatepass

Where in the folder structure is your view?
it should be under \applications\gatepass\views\greet

> Please can you help ? is my url wrong or?

URL is fine.


-- 
Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

Reply via email to