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>
Source:stackexchange.com