I am currently using this syntax in my Django 1.1.2 template:
{% ifnotequal myvalue 'ABC' %}
However, I now need to check “myvalue” to see if it’s “ABC” or “DEF”. Any thoughts?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would suggest determining this equality in the view and passing it in the context back to the template. In the template, you would test the variable instead of
myvalueto determine what to display.