# Sum function in django

**URL:** <https://forum.codewithmosh.com/t/sum-function-in-django/10021>\
**Category:** Python\
**Created:** [January 17, 2022, 9:06pm UTC](https://forum.codewithmosh.com/t/sum-function-in-django/10021 "2022-01-17T21:06:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdav](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sdav](https://forum.codewithmosh.com/u/sdav)\
**Post date:** [January 17, 2022, 9:06pm UTC](https://forum.codewithmosh.com/t/sum-function-in-django/10021/1 "2022-01-17T21:06:37Z")

</div>

I’m new to django and have being trying my hands on a few stuffs. Currently building a small accounting app with django.  
I will like to know what view function can be used to sum up the values in the row and store in a column as total\_price. I will prefer the total\_price returned as an integer not a dic
