I have this function and I want to allow only 2 decimal places for the value.
This is not a model field but it's being calculated from them. What is the right way to do it?
@property
def value(self):
value = self.average_flow_rate * (self.d_n / 1000) / self.nu
if 2320 < value < 4000:
return 4000
else:
return value