[Django]-How can I add value in Django 2 template

2👍

There is a built-in filter in Django template called add. You can add something to a value in templates using {{ value|add:"2" }}.

In this case specifically, try:

<td id="demo">{{ i }} to {{ i|add:"1" }}</td>
👤aminrd

Leave a comment