I have the following class in django:
class Income(models.Model):
product=models.ForeignKey()
byproduct=models.ForeignKey()
quant_jan=models.DecimalField()
quant_feb=models.DecimalField()
price_jan=models.DecimalField()
price_feb=models.DecimalField()
.....
Now in my view I have created the following variable:
monthly_income= list(0 for m in range(12))
I want to fill this variable with the product of quant*price for each month (e.g. in monthly_income[0] = quant_jan*price_jan and so on).
How could get it with python?