From 91f69a2754b38ea4583ef240f589d4da97f55c9d Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 28 Aug 2014 00:55:22 +0200 Subject: Add clickable stat points --- app/views/stats.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/views/stats.py') 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//') +@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 -- cgit v1.2.3-54-g00ecf