Reputation: 198
I am new to Django and when I use Aggregate method, it returns something like:
{'max__age' : 35}
but I need to display just the number ("35" in this example).
Upvotes: 1
Views: 63
Reputation: 477883
You use subscripting to access the value. So for example:
MyModel.objects.aggregate(…)['max__age']
Upvotes: 1