diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-03-15 23:59:14 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-03-15 23:59:14 +0100 |
commit | fb5df6041fc7bf97429bfe689e26fdc08e7e307f (patch) | |
tree | 6a9f6f39a2b0c8c7e3ca353ae6b624cfab5b312b /pyaggr3g470r/views/views.py | |
parent | pylint check (diff) | |
download | newspipe-fb5df6041fc7bf97429bfe689e26fdc08e7e307f.tar.gz newspipe-fb5df6041fc7bf97429bfe689e26fdc08e7e307f.tar.bz2 newspipe-fb5df6041fc7bf97429bfe689e26fdc08e7e307f.zip |
A new test for the history page.
Diffstat (limited to 'pyaggr3g470r/views/views.py')
-rw-r--r-- | pyaggr3g470r/views/views.py | 11 |
1 files changed, 7 insertions, 4 deletions
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/<int:year>', methods=['GET']) +@app.route('/history/<int:year>/<int:month>', 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']) |