[Answer]-Record Total Value in Django

1👍

There doesn’t really seem to be any good reason to pre-calculate the field here. Multiplying one existing value by another is a simple operation, and there’s no benefit to be gained by calculating it on save.

There would only be some benefit if the value to be calculated involved a lot of complex and expensive operations, such as querying multiple tables or calling an external API.

Leave a comment