Re: complex math calculation from query set # SOLVED

2021-07-24 Thread Franck Tchouanga
Guys I got a good place to manage all your django and good enough developer and designers for your project just check out the below link to get it all https://bit.ly/3eUJJcX On Sat, Jul 24, 2021 at 7:36 PM esteem learning center < ahmeddauda.dr...@gmail.com> wrote: > If you want to do some

Re: complex math calculation from query set # SOLVED

2021-07-24 Thread esteem learning center
If you want to do some basic django calculations, you can use django-mathfilters is simple to use for add, subtract, mul, and div On Sat, Jul 24, 2021, 3:33 PM mab.mo...@gmail.com wrote: > Thank you Derek for the information. For those that are having similar > problems this is the solution

Re: complex math calculation from query set # SOLVED

2021-07-24 Thread mab.mo...@gmail.com
Thank you Derek for the information. For those that are having similar problems this is the solution that worked for me based on Derek's lead ## METHOD 1 ## # view def position_view(request): packet_data = TncData.objects.exclude(lat=0).order_by('-dt_heard')[:100] # loop through

Re: complex math calculation from query set

2021-07-21 Thread mab.mo...@gmail.com
Thanks Derek. I'll give it a try On Wednesday, July 21, 2021 at 8:55:08 AM UTC-5 Derek wrote: > See: > https://stackoverflow.com/questions/54412377/adding-values-to-django-queryset > > > VIEW > > def position_view(request): > > packet_data = >

Re: complex math calculation from query set

2021-07-21 Thread Derek
Ignore the "'distance': distance" in the return - that should not be there. On Wednesday, 21 July 2021 at 15:55:08 UTC+2 Derek wrote: > See: > https://stackoverflow.com/questions/54412377/adding-values-to-django-queryset > > > VIEW > > def position_view(request): > > packet_data = >

Re: complex math calculation from query set

2021-07-21 Thread Derek
See: https://stackoverflow.com/questions/54412377/adding-values-to-django-queryset VIEW def position_view(request): packet_data = TncData.objects.exclude(lat=0).order_by('-dt_heard')[:100] for packet in packet_data: *# my complex math calculation* *packet.distance =

complex math calculation from query set

2021-07-20 Thread mab.mo...@gmail.com
Hello, I am trying to perform a complex math calculation from a django query set. How can I pass the results to the template for display? Annotations won't work since the math is not a simple sum, diff or average. MODEL class TncData(models.Model): callsign =