On Jul 18, 2017 7:21 PM, "sum abiut" <suab...@gmail.com> wrote:

Hi,
needed direction maths filters on django templates. for example how to you
perform this on a template.

a*b +b*c

i did      a|mul:b|add:b|mul:c    but got a wrong answer. Please point me
to right direction.


I wouldn't do any sort of advanced math in the template. It should be
completed in the view and added to the template context, then referenced as
a template variable. The template processor has no concept of the order of
operations in math.

-James

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWfni0w6XZmfqrjnsrTLiWZLh0NWu9ye%2BA_Cm0NDb6x3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to