diff options
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 |