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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -