fix: Display human name for tea type

This commit is contained in:
Thomas Schwery 2022-03-06 10:52:44 +01:00
parent b4c4a24ec7
commit 6d085fc75b
2 changed files with 2 additions and 1 deletions
tea/templates/tea

View file

@ -1,7 +1,7 @@
{% extends 'homepage/base.html' %}
{% block content %}
<h2>{{ tea.company.name }} - {{ tea.name }} ({{ tea.tea_type }})</h2>
<h2>{{ tea.company.name }} - {{ tea.name }} ({{ tea.get_tea_type_display }})</h2>
<p class="lead">
{{ tea.ingredients }}

View file

@ -7,6 +7,7 @@
{% for tea in company.tea_set.all %}
<li {% if not tea.available %} style="text-decoration: Line-Through"{% endif %}>
<a href="{% url 'tea:detail' tea.id %}">{{ tea.name }}</a>
<class>{{ tea.get_tea_type_display }}</class>
</li>
{% endfor %}
</ul>