1๐
โ
You should remove quotes in lines:
{% with t=turl1 %}
{% with o=ourl1 %}
If you want to iterate over it, you should pass in two arrays from your view.
{'urls': [[turl1, ourl1], [turl2, ourl2]]}
Then iterate over it in your template:
{% for t, o in urls %}
<a href="{{ o }}">
<img src="{{ t }}"/>
</a>
{% endfor %}
๐คYossi
0๐
If turl1, turl2...ourl1, ourl2
are context variables then in the django templates you need to put them between { ... }
- [Answer]-Mezzanine: where is the database created by `manage.py createdb`
- [Answer]-Write encoding in xml
- [Answer]-Django throws 404 and fails to match URLs properly
- [Answer]-Accessing the first object in list to have an optional property in a Django template
- [Answer]-Django Truncate, return false if no truncation occurs?
Source:stackexchange.com