You can try Mako, its template is more powerful, just looks like Python, and
you can easily integrate it with django.

2009/4/16 Nick Johnson (Google) <[email protected]>

>
> Hi Aaron,
>
> Django's template syntax is extremely limited. It doesn't natively
> support ORing two equality queries together. You can define an |equals
> filter and use the {if} statement instead of {ifequal}, but that's an
> advanced topic.
>
> -Nick Johnson
>
> On Apr 15, 10:00 pm, Aaron <[email protected]> wrote:
> > Hi, I am using django .
> >
> > I  am trying to use a If statement with an or.
> >
> > what I am trying to do is   make a if statement like  if  the website
> > title is this  or that then  do this.
> >
> > so It's like  IF  title = "home"  or  "request" do this{
> >
> > }
> >
> > when I tried that I got a error wrong block or something like that.
> >
> > Then I tried using the code  if  code to grab title ="home" or  code
> > to grab title ="request" {do this}
> >
> > Basicly I have a request form and I only want to show it on 2 pages.
> >
> > How can I do this. I even played with the if equal.  I got an Error
> > saying that I have 2 or more arguments.
> >
> > So how can I do this?  I currently have  2 if statements  meaning have
> > them seperate which took away the errors but displays nothing.
> >
> > I know that if I put those 2 if statements then it will cancel each
> > other out because it's like saying if those 2 pages are loaded at the
> > same time then display the form.
> >
> > So I am trying to find how I can display this form for only 2 pages.
> >
> > basicly here is the if statements I am using :
> >
> > {% ifequal flatpage.title "Sign Up" %}
> > {% ifequal flatpage.title "Services" %}
> >
> > I know it's wrong. The reason it cancels each others out.
> >
> > I tried if statements and it gives me errors saying wrong block. I
> > then tried if equal which gave me an error saying I have 2 or more
> > arguments which I think I can't have.
> >
> > I did took a look at django's guide area on their project site. I
> > can't really find a solution.
> >
> > any idea how I can do this. I know how to do it in php.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to