Template tags#

The transactions app ships one template-tag library – transactiontags – with two helper tags. Loaded in templates with:

- load 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).

  • transaction_url() – detail URL for a transaction; routes to transactions:open_detail or transactions:closed_detail based on the transaction’s is_closed flag.

richy.transactions.templatetags.transactiontags.average_price(transactions)[source]#
richy.transactions.templatetags.transactiontags.transaction_url(transaction)[source]#