fix BMI
This commit is contained in:
parent
60002cfdeb
commit
948cc7cf17
|
@ -513,6 +513,7 @@ class HeightWeight(Seasonisable):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def bmi(self):
|
def bmi(self):
|
||||||
|
height = self.height / 100
|
||||||
return self.weight / (self.height * self.height)
|
return self.weight / (self.height * self.height)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
<td>{{ heightweight.height }}</td>
|
<td>{{ heightweight.height }}</td>
|
||||||
<td>{{ heightweight.hips_height }}</td>
|
<td>{{ heightweight.hips_height }}</td>
|
||||||
<td>{{ heightweight.weight }}</td>
|
<td>{{ heightweight.weight }}</td>
|
||||||
<td>{{ heightweight.bmi }}</td>
|
<td>{{ heightweight.bmi | floatformat:2 }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in New Issue