Add a 404 page and improve manufacturer lookup (#36)

* Add a custom 404 page
* Better manufacturer and item lookup
* Add migration to populate new field
* Version bump
This commit is contained in:
2024-04-24 00:33:41 +02:00
committed by GitHub
parent 54a68d9b1f
commit 6a9f37ca05
7 changed files with 69 additions and 15 deletions

View File

@@ -60,7 +60,7 @@
</tr>
<tr>
<th scope="row">Item number</th>
<td>{{ d.item.item_number }}{%if d.item.set %} | <a class="badge text-bg-primary" href="{% url 'manufacturer' manufacturer=d.item.manufacturer search=d.item.item_number %}">SET</a>{% endif %}</td>
<td>{{ d.item.item_number }}{%if d.item.set %} | <a class="badge text-bg-primary" href="{% url 'manufacturer' manufacturer=d.item.manufacturer.slug search=d.item.item_number_slug %}">SET</a>{% endif %}</td>
</tr>
</tbody>
</table>

View File

@@ -120,7 +120,7 @@
</tr>
<tr>
<th scope="row">Item number</th>
<td>{{ rolling_stock.item_number }}{%if rolling_stock.set %} | <a class="badge text-bg-primary" href="{% url 'manufacturer' manufacturer=rolling_stock.manufacturer search=rolling_stock.item_number %}">SET</a>{% endif %}</td>
<td>{{ rolling_stock.item_number }}{%if rolling_stock.set %} | <a class="badge text-bg-primary" href="{% url 'manufacturer' manufacturer=rolling_stock.manufacturer.slug search=rolling_stock.item_number_slug %}">SET</a>{% endif %}</td>
</tr>
</tbody>
</table>
@@ -173,7 +173,7 @@
</tr>
<tr>
<th scope="row">Item number</th>
<td>{{ rolling_stock.item_number }}{%if rolling_stock.set %} | <a class="badge text-bg-primary" href="{% url 'manufacturer' manufacturer=rolling_stock.manufacturer search=rolling_stock.item_number %}">SET</a>{% endif %}</td>
<td>{{ rolling_stock.item_number }}{%if rolling_stock.set %} | <a class="badge text-bg-primary" href="{% url 'manufacturer' manufacturer=rolling_stock.manufacturer.slug search=rolling_stock.item_number_slug %}">SET</a>{% endif %}</td>
</tr>
<tr>
<th scope="row">Era</th>