summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to '')
-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