diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2015-04-11 16:14:19 +0200 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2015-04-12 14:31:06 +0200 |
commit | 21da20f5d592aabcb60096768dcac76baa626315 (patch) | |
tree | f5381a80073726450be90acae594369ef01b982d /pyaggr3g470r/views/views.py | |
parent | regrouping favorties and home, redoing the tab selection jscode (diff) | |
download | newspipe-21da20f5d592aabcb60096768dcac76baa626315.tar.gz newspipe-21da20f5d592aabcb60096768dcac76baa626315.tar.bz2 newspipe-21da20f5d592aabcb60096768dcac76baa626315.zip |
first take on redoing the menu
Diffstat (limited to 'pyaggr3g470r/views/views.py')
-rw-r--r-- | pyaggr3g470r/views/views.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py index 623cf5d4..3d3c47f6 100644 --- a/pyaggr3g470r/views/views.py +++ b/pyaggr3g470r/views/views.py @@ -224,13 +224,11 @@ def signup(): return render_template('signup.html', form=form) @app.route('/') -@app.route('/favorites') @login_required -def home(): +def home(favorites=False): """ Home page for connected users. Displays by default unread articles. """ - favorites = request.path.startswith('/favorites') head_title = gettext('Favorites') if favorites else '' feed_contr = FeedController(g.user.id) arti_contr = ArticleController(g.user.id) @@ -271,6 +269,12 @@ def home(): default_max_error = conf.DEFAULT_MAX_ERROR) +@app.route('/favorites') +@login_required +def favorties(): + return home(favorites=True) + + @app.route('/fetch', methods=['GET']) @app.route('/fetch/<int:feed_id>', methods=['GET']) @login_required |