Hello,
I'm new to web development and Python. I helped a friend with his
website, which is written in PHP. But the source code is so bad, that I
decided to rewrite the hole page. So I found the djange webframework.I
like it and try to rewrite the page with it.
Now I have a litte question. I try to write a template, which get a
filename and the mimetype as parameter. It looks like this
{% ifequal mime 'image/jpeg'%}
<img src='{{media}}' alt='{{mediatext}}' />
{% endifequal %}
{% ifequal mime 'application/pdf' %}
<object data='{{media}}' type='{{mime}}' width='800' height='600'>
</object>
{% endifequal %}
But now I want to compare 'image/gif'. A gif works like a jpeg. But I
didn't find a solution to write
{% ifequal mime 'image/jpeg' or 'image/gif'%}
or
{% if mime in ['image/jpeg', 'image/gif] '%}
Is there any chance to compare multiple values? Or are there better
solution for my problem?
Regards,
Bernd
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---