This is not possible because Django intentionally provides very limited syntax that does not include mathematical operators. You can do this by creating a custom template filter , but this is a bad idea - you would be better off pre-processing the data before passing it to so you don't need a math operator. This, of course, is what Django wants you to do.
source
share