I have 2 DecimalFields in 1 model. How can I sum both fields together and have the total show up in the admin view?
price = models.DecimalField(max_digits=6, decimal_places=2)
spotters = models.DecimalField(max_digits=6, decimal_places=2, default=150)
There has to be a "container to retain the sum in admin view so I have:
total_price = models.DecimalField(max_digits=100, decimal_places=3, default=0)
At the end.
Then I finish with a return method:
def get_cost(self):
return self.price + self.spotters
But its not working.