{# UGE / L2 / Intro to relational databases / Python project prototype Author: Pacien TRAN-GIRARD Licence: EUPL-1.2 #} {% extends '_base.html.jinja' %} {% block title %}My wallet{% endblock %} {% macro format_operation(transaction) %} {% if transaction.operation == 'transfer' %} {% if transaction.amount > 0 %} Transfer from {{ transaction.source }} {% else %} Transfer to {{ transaction.recipient }} {% endif %} {% else %} {{ transaction.operation.capitalize() }} {% endif %} {% endmacro %} {% macro amount_class(transaction) %} {{ 'amount-positive' if transaction.amount > 0 else 'amount-negative'}} {% endmacro %} {% block content %}
Date | Operation | Amount |
---|---|---|
{{ transaction.datetime.strftime('%Y-%m-%d %H:%M:%S') }} | {{ format_operation(transaction) }} | {{ transaction.amount }} § |
No past transaction. |