summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2014-08-28 00:55:22 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2014-08-28 00:55:22 +0200
commit91f69a2754b38ea4583ef240f589d4da97f55c9d (patch)
treef6cda5c7ecdf224fb7b896a14131fc2e34d0118c /app
parent93cd07c81463959b7281a10557ea1d9471b97322 (diff)
downloadkosten-91f69a2754b38ea4583ef240f589d4da97f55c9d.tar.gz
kosten-91f69a2754b38ea4583ef240f589d4da97f55c9d.tar.bz2
kosten-91f69a2754b38ea4583ef240f589d4da97f55c9d.zip
Add clickable stat points
Diffstat (limited to 'app')
-rw-r--r--app/views/stats.py10
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