From fb5df6041fc7bf97429bfe689e26fdc08e7e307f Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 15 Mar 2015 23:59:14 +0100 Subject: A new test for the history page. --- pyaggr3g470r/views/views.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'pyaggr3g470r/views/views.py') diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py index 88835068..b7ccf955 100644 --- a/pyaggr3g470r/views/views.py +++ b/pyaggr3g470r/views/views.py @@ -539,10 +539,13 @@ def management(): not_on_heroku = not conf.ON_HEROKU) @app.route('/history', methods=['GET']) -@login_required -def history(): - #user = User.query.filter(User.id == g.user.id).first() - return render_template('history.html') +@app.route('/history/', methods=['GET']) +@app.route('/history//', methods=['GET']) +def history(year=None, month=None): + articles_counter, articles = utils.history(year, month) + return render_template('history.html', articles_counter=articles_counter, + articles=articles, + year=year, month=month) @app.route('/bookmarklet', methods=['GET']) @app.route('/create_feed', methods=['GET', 'POST']) -- cgit