class PO(models.Model) qty = models.IntegerField(null=True) cost = models.IntegerField(null=True) total = qty * cost
How will I solve <
You can make total a property field, see the docs
total
property
class PO(models.Model) qty = models.IntegerField(null=True) cost = models.IntegerField(null=True) def _get_total(self): "Returns the total" return self.qty * self.cost total = property(_get_total)