How to save result of the comparison with Django ‘with’ template tag?

I would like to create new variable in django template, which will have a value of comparison

Unfortunately none of these code doesn’t work:

{% with as default %}{% endwith %}

{% with %}{% endwith %}

What is the proper syntax?

Source: python

Leave a Reply