Add a CSV export functionality in admin and add price fields (#41)

* Implement an action do download data in csv
* Refactor CSV download
* Move price to main models and add csv to bookshelf
* Update template and API
* Small refactoring
This commit is contained in:
2024-12-29 21:46:57 +01:00
committed by GitHub
parent 7eddd1b52b
commit 026ab06354
18 changed files with 421 additions and 15 deletions

View File

@@ -113,6 +113,12 @@
<th scope="row">Purchase date</th>
<td>{{ book.purchase_date|default:"-" }}</td>
</tr>
{% if request.user.is_staff %}
<tr>
<th scope="row">Price ({{ site_conf.currency }})</th>
<td>{{ book.price|default:"-" }}</td>
</tr>
{% endif %}
</tbody>
</table>
{% if properties %}

View File

@@ -187,6 +187,12 @@
<th scope="row">Purchase date</th>
<td>{{ rolling_stock.purchase_date|default:"-" }}</td>
</tr>
{% if request.user.is_staff %}
<tr>
<th scope="row">Price ({{ site_conf.currency }})</th>
<td>{{ rolling_stock.price|default:"-" }}</td>
</tr>
{% endif %}
</tbody>
</table>
{% if properties %}