aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-12-01 23:43:12 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-12-01 23:43:12 +0100
commite5677b163b88d12ce7a94f03cb61ada236a5dd2b (patch)
treeb1d5b7ccee68ab3c766d3506c531963c340598e4 /pyaggr3g470r/views.py
parentThe /feeds page has benn slightly updated. (diff)
downloadnewspipe-e5677b163b88d12ce7a94f03cb61ada236a5dd2b.tar.gz
newspipe-e5677b163b88d12ce7a94f03cb61ada236a5dd2b.tar.bz2
newspipe-e5677b163b88d12ce7a94f03cb61ada236a5dd2b.zip
Minor improvements for the /search page.
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r--pyaggr3g470r/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 98362d05..cdbc1a45 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -262,7 +262,7 @@ def search():
result = []
query = request.args.get('query', None)
if query != None:
- results = fastsearch.search(query)
+ results, nb_articles = fastsearch.search(query)
for feed_id in results:
for feed in user.feeds:
if str(feed.oid) == feed_id:
@@ -271,7 +271,7 @@ def search():
current_article = models.Article.objects(id=article_id).first()
feed.articles.append(current_article)
result.append(feed)
- return render_template('search.html', feeds=result)
+ return render_template('search.html', feeds=result, nb_articles=nb_articles, query=query)
@app.route('/management/', methods=['GET'])
@login_required
bgstack15