Devinwon / article

0 stars 0 forks source link

+-*/ in Django template #34

Open Devinwon opened 5 years ago

Devinwon commented 5 years ago

priority add>plus

{{ var|add:-1}} or {% widthratio f1 f2 f3 %} ==>(f1/f2)f3 how to new a variable in template,may be you can code like this: {% widthratio f1 1 5 as varname %}, This is my {{ varname|add:-10 }} ==>(f1/1)5-10