I have login form (I can regiser, or log in, ...) but how to apply this
login to some site page.

from login.form I can get user.name or user.id

I need something like if to check this

{{ if user.name == 'user':}}
go to some page or some content
{{else:}}
open login form
{{pass}}

this is what is on my mind but is this only options or already is something
implemented by default.

- - Miroslav Gojic - -


On Tue, Oct 11, 2011 at 00:10, Massimo Di Pierro <massimo.dipie...@gmail.com
> wrote:

> In fact this
> {{if {{=request.function}} == index:}}
> is wrong because web2py would look for the first {{ and the first }}
> and try interpret the code in between as python. By
>
> "if {{=request.function" is not valid python.
>
> You want:
>
> {{if request.function == 'index':}}
>
>
> On Oct 10, 4:28 pm, Anthony <abasta...@gmail.com> wrote:
> > > {{if {{=request.function}} == index:}}
> >
> > Yes, once you're inside a {{}}, you can write any Python and refer to any
> > global (or local) variables -- so no need to nest another {{=}} in there.
>

Reply via email to