diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2014-08-28 00:55:22 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2014-08-28 00:55:22 +0200 |
commit | 91f69a2754b38ea4583ef240f589d4da97f55c9d (patch) | |
tree | f6cda5c7ecdf224fb7b896a14131fc2e34d0118c /app/views | |
parent | 93cd07c81463959b7281a10557ea1d9471b97322 (diff) | |
download | kosten-91f69a2754b38ea4583ef240f589d4da97f55c9d.tar.gz kosten-91f69a2754b38ea4583ef240f589d4da97f55c9d.tar.bz2 kosten-91f69a2754b38ea4583ef240f589d4da97f55c9d.zip |
Add clickable stat points
Diffstat (limited to '')
-rw-r--r-- | app/views/stats.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/views/stats.py b/app/views/stats.py index 90f1686..83c8154 100644 --- a/app/views/stats.py +++ b/app/views/stats.py @@ -8,6 +8,7 @@ from ..model import ConstExpense import sqlalchemy as sql import calendar from collections import defaultdict +from flask import jsonify mod = Blueprint('stats', __name__) @@ -20,6 +21,15 @@ def next_date(d): def date_to_ms(d): return calendar.timegm(d.timetuple()) * 1000 +@mod.route('/_const/<int(fixed_digits=4):year>/<int(fixed_digits=2):month>') +@login_required +@templated +def const_dialog(year,month): + consts = ConstExpense.of_month(current_user, month, year).order_by(ConstExpense.description) + + return { 'consts': consts } + + @mod.route('/') @login_required @templated |