Re: Math filter

2017-07-20 Thread Vijay Khemlani
Don't worry, I only knew about the project because I use it in a small part of an application that can't execute computations on the view On Wed, Jul 19, 2017 at 10:02 PM, Mike Morris wrote: > On 07/19/2017 06:20 PM, Vijay Khemlani wrote: > >> I'm guessing he's using the mathfilters package >> >

Re: Math filter

2017-07-19 Thread Mike Morris
On 07/19/2017 06:20 PM, Vijay Khemlani wrote: I'm guessing he's using the mathfilters package https://github.com/dbrgn/django-mathfilters Arggghhh... my ignorance is showing! I hope I included an "I'm new here" disclaimer in the original post!!! Anyway, never heard of it, I'll take a look!

Re: Math filter

2017-07-19 Thread Vijay Khemlani
I'm guessing he's using the mathfilters package https://github.com/dbrgn/django-mathfilters On Wed, Jul 19, 2017 at 7:28 PM, Mike Morris wrote: > Of course, if they're integers you could implement the "mul" as a loop of > "add"s... clumsy, but would work. > > On 07/19/2017 03:39 PM, Mike Morris

Re: Math filter

2017-07-19 Thread Mike Morris
Of course, if they're integers you could implement the "mul" as a loop of "add"s... clumsy, but would work. On 07/19/2017 03:39 PM, Mike Morris wrote: I am a newbie, but I think the answer is that you can't do that in the template - instead, calculate the number in the view and pass it to t

Re: Math filter

2017-07-19 Thread Mike Morris
I am a newbie, but I think the answer is that you can't do that in the template - instead, calculate the number in the view and pass it to the template in the context dictionary. I think it's a design philosophy of Django Template Language to not support this as it muddies the border between d

Re: Math filter

2017-07-19 Thread Vijay Khemlani
Also I guess mathfilters just executes left-to-right so a|mul:b|add:b|mul:c is (((a * b) + b) * c) On Wed, Jul 19, 2017 at 1:50 AM, James Schneider wrote: > > > On Jul 18, 2017 7:21 PM, "sum abiut" wrote: > > Hi, > needed direction maths filters on django templates. for example how to you >

Re: Math filter

2017-07-18 Thread James Schneider
On Jul 18, 2017 7:21 PM, "sum abiut" 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:cbut got a wrong answer. Please point me to right direction. I wouldn't do any sort of advanced math

Math filter

2017-07-18 Thread sum abiut
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:cbut got a wrong answer. Please point me to right direction. cheers, -- You received this message because you are subscribed to the Google Groups