python - Invalid filter: 'revision' -
python - Invalid filter: 'revision' -
when using next code:
{% ""|add:revision.width|add:"x"|revision.height dimensions %} {% thumbnail revision.image dimensions thumb %} {% endwith %} i receive next error:
django version: 1.6.11 exception type: templatesyntaxerror exception value: invalid filter: 'revision' exception location: /usr/local/lib/python2.7/site-packages/django/template/base.py in find_filter, line 366 python executable: /usr/local/bin/python python version: 2.7.9 why? , can prepare it?
the problem lastly applied filter in chain (revision.height).
replace:
{% ""|add:revision.width|add:"x"|revision.height dimensions %} with:
{% ""|add:revision.width|add:"x"|add:revision.height dimensions %} you can assign variables revision.width , revision.height:
{% width=revision.width height=revision.height %} {% ""|add:width|add:"x"|add:height dimensions %} ... {% endwith %} {% endwith %} python django
Comments
Post a Comment