Created
January 30, 2013 22:56
-
-
Save ollieglass/4678105 to your computer and use it in GitHub Desktop.
Django view for categorising credit card transactions, from my personal finance mini-hackathon http://ollieglass.com/2013/01/30/personal-finance-mini-hackathon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% loop through transactions... %} | |
<td> | |
{% if not transaction.merchant.category %} | |
<select data-value="{{ transaction.id }}"> | |
<option value="-1">Not set</option> | |
{% for category in categories %} | |
<option value="{{ category.id }}">{{ category.name }}</option> | |
{% endfor %} | |
</select> | |
{% else %} | |
{{ transaction.merchant.category.name }} | |
{% endif %} | |
</td> | |
{% endloop %} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment