fix #48 aka. show recent coins on index page
This commit is contained in:
parent
5ba73e0e1e
commit
e65e901a66
@ -4,7 +4,7 @@
|
||||
{% include 'coinc/filter_country.html' with countrys=countrys %}
|
||||
<p><h5>Zuletzt hinzugefügt</h5></p>
|
||||
{% for coin in recent_coins %}
|
||||
<p>{{ coin.found_on|date:"d.m.Y" }}: {{ coin.value }}€ {{ coin.name }} von {{ coin.found_by }}</p>
|
||||
<p>{{ coin.found_on|date:"d.m.Y" }}: {{ coin.value|floatformat:2 }} € {{ coin.name }} von {{ coin.found_by }}</p>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>Trage zuerst Länder im Adminbereich ein.</p>{% endif %}
|
||||
|
@ -1,3 +1,3 @@
|
||||
<span class="badge badge-pill badge-light">Version 201026</span>
|
||||
<span class="badge badge-pill badge-light">Version 210705</span>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -42,8 +42,8 @@ def index(request):
|
||||
users = User.objects.order_by('id')
|
||||
coin_sum = total_coin_sum()
|
||||
recent_coins = Coin.objects.order_by('-found_on')[:10]
|
||||
for coin in recent_coins:
|
||||
recent_coins[coin][value] /= 100
|
||||
for coin in range(len(recent_coins)):
|
||||
recent_coins[coin].value /= 100
|
||||
context = {
|
||||
'countrys': countrys,
|
||||
'users': users,
|
||||
|
Loading…
x
Reference in New Issue
Block a user