Hello mate,
Simple get the value from the objects and store in separate variables. Then
you may do any and as many calculations you want and return the desired
value :)
Kind Regards,
Aditya
On Mon, Jun 3, 2019, 12:18 PM carlos wrote:
> Hi, i used django 1.11 and try used annotate
>
> i have mode
Hi, i used django 1.11 and try used annotate
i have model with 3 decimal fields i would like sum 2 and multiply for
other field but with aritmetic calculation
i have used this query
(1) total = Model.objects.annotate(all=Sum(F('fieldA') + F('fieldB') *
F('fieldC')))
but this return queryset with
You were rightthe error resolved when I removed curly braces from the
if statement. Thanks alot !!
On 01-Jun-2019 11:26 am, "sagar ninave" wrote:
> you do not have ended for loop
>
> On Fri, May 31, 2019 at 7:41 PM anchal agarwal
> wrote:
>
>> I am creating a simple form in which when a user
The solution I ended up going with was using a PostgreSQL table lock:
@contextmanager
@transaction.atomic
def lock_table(model):
"""Performs a table lock on the provided model.
Note that this locks the entire table for the given model
and prevents any other operations from occurring on that
model.
https://stackoverflow.com/questions/56407153/radio-button-with-default-selection-in-django
Not understanding where am i going wrong here.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails
5 matches
Mail list logo