Variable subtraction in django templates

You need to use double quotes:

{{ myval|add:"-5" }}

This subtracts five from myval.

Leave a Comment