Template tags ============= The ``transactions`` app ships one template-tag library -- ``transactiontags`` -- with two helper tags. Loaded in templates with: .. code-block:: text - load transactiontags * :func:`~richy.transactions.templatetags.transactiontags.average_price` -- weighted average price across a list of transactions: ``sum(t.get_value() for t in transactions) / sum(t.amount for t in transactions)``. * :func:`~richy.transactions.templatetags.transactiontags.transaction_url` -- detail URL for a transaction; routes to ``transactions:open_detail`` or ``transactions:closed_detail`` based on the transaction's ``is_closed`` flag. .. autofunction:: richy.transactions.templatetags.transactiontags.average_price .. autofunction:: richy.transactions.templatetags.transactiontags.transaction_url