You can possibly try to use block inheritance. Save the block in
another page say 'sign_up_services.html', in the page, add:
{% extends 'sign_up_services.html' %}
...
{% block that_block_defined_in_sign_up_services %}
{% ifequal flatpage.title "Sign Up" %}
{{ block.super }}
{% endifequal %}
{% ifequal flatpage.title "Services" %}
{{ block.super }}
{% endifequal %}
...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 -~----------~----~----~----~------~----~------~--~---
