79820168

Date: 2025-11-14 15:17:46
Score: 0.5
Natty:
Report link

You can also make it simple

from django.db.models import Sum
product_total= Product.objects.aggregate(price=Sum('price'))['price'] or 0

which will give you just the amount. Eg: 4379 so the price is from your database column

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Chika Nwazuo Evuka