Bugfixing (#27)

* Enforce ordering on some metadata models
* Fix a 500 error while accessing flat pages
* Clean up HTML and fix cards (missing class)
* Make the "driver" app optional and disabled by default
This commit is contained in:
2023-10-10 22:17:21 +02:00
committed by GitHub
parent 448ecae070
commit 87e1107156
9 changed files with 44 additions and 18 deletions

View File

@@ -2,12 +2,10 @@
<div class="card shadow-sm">
<a href="{{ d.item.get_absolute_url }}">
{% if d.item.image %}
<img src="{{ d.item.image.url }}" alt="Card image cap">
<img class="card-img-top" src="{{ d.item.image.url }}" alt="{{ d }}">
{% else %}
{% with d.item.consist_item.first.rolling_stock as r %}
{% for i in r.image.all %}
{% if forloop.first %}<img src="{{ i.image.url }}" alt="Card image cap">{% endif %}
{% endfor %}
<img class="card-img-top" src="{{ r.image.first.image.url }}" alt="{{ d }}"></a>
{% endwith %}
{% endif %}
</a>