[Fixed]-How do I add up all the numbers from all the fields using Django aggregate?

1👍

You should be able to do something like this:

return models.Model.objects.aggregate(number=(Sum('field_one') + Sum('field_two') + Sum('field_three')))

Leave a comment