Thursday, November 5, 2009

ifnotequal -- is this correct?

Hello, I've been trying to do this in one of my templates:

{% ifnotequal object.post_img "imgs/blank.jpg" %}
<img src="{{ object.post_img.url }}" class="left" width=131
height=100 alt=" " />
{% endifnotequal %}

only it still shows the image when the object.post_img is imgs/
blank.jpg. I even printed the object.post_img out to double check they
where the same.

blank.jpg isn't actually a blank image. Its a generic image i don't
want to appear in this template.

has anyone any ideas where i am going wrong?

thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate