Stuck with Calculated feild

2020-09-22 Thread eankomah
Hi all am stuck at getting total_price Calculated in my model class inventory(models.Model): def __str__(self): return self.name category = models.ForeignKey(Category, null=True, on_delete = models.SET_NULL) Supplier = models.ForeignKey(Supplier, null=True, on_delete = model

Calculated feild in models

2020-09-19 Thread eankomah
I have two fields: quantity = models.FloatField() unit_price = models.FloatField() and i want ot do someting like this total_price = models.FloatField('unit_price' * 'quantity') Thanks -- You received this message because you are subscribed to the Google Groups "Django users" gr