#48 add optional coin.stamp attribute to template

This commit is contained in:
Moritz Münch 2021-07-12 12:18:43 +00:00
parent 0938875092
commit 25f0184d76
2 changed files with 2 additions and 6 deletions

View File

@ -66,7 +66,7 @@ class Stamp(Model):
def __str__(self):
return f"{self.name_short} - {self.name}"
return f"{self.name_short}"

View File

@ -4,11 +4,7 @@
{% include 'coinc/filter_country.html' with countrys=countrys %}
<p><h5>Zuletzt gefunden</h5></p>
{% for coin in recent_coins %}
{% if coin.name %}
<p>{{ coin.found_on|date:"d.m.Y" }}: {{ coin.value|floatformat:2 }} € von {{ coin.year }} "{{ coin.name }}" aus {{ coin.country}} von {{ coin.found_by }}</p>
{% else %}
<p>{{ coin.found_on|date:"d.m.Y" }}: {{ coin.value|floatformat:2 }} € von {{ coin.year }} aus {{ coin.country}} von {{ coin.found_by }}</p>
{% endif %}
<p>{{ coin.found_on|date:"d.m.Y" }}: {{ coin.value|floatformat:2 }} &euro; {{ coin.year }}{% if coin.stamp %}-{{ coin.stamp }}{% endif %}{% if coin.name %} "{{ coin.name }}"{% endif %} aus {{ coin.country}} von {{ coin.found_by }}</p>
{% endfor %}
{% else %}
<p>Trage zuerst Länder im Adminbereich ein.</p>