This commit is contained in:
Gregory Trullemans 2023-11-21 09:17:18 +01:00
parent 60002cfdeb
commit 948cc7cf17
2 changed files with 2 additions and 1 deletions

View File

@ -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):

View File

@ -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>