diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-21 18:48:06 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-21 18:48:06 +0100 |
commit | 4be4f98f70144fb1e1aaec6b8fa3033196e292b3 (patch) | |
tree | 9cdeaa288c77df6fe5d28243b98a7b75440b9e6c /pyaggr3g470r/views.py | |
parent | No need to sort the list of articles by date. (diff) | |
download | newspipe-4be4f98f70144fb1e1aaec6b8fa3033196e292b3.tar.gz newspipe-4be4f98f70144fb1e1aaec6b8fa3033196e292b3.tar.bz2 newspipe-4be4f98f70144fb1e1aaec6b8fa3033196e292b3.zip |
Added an option to index all the database.
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r-- | pyaggr3g470r/views.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index 991e25b0..1990633a 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -221,6 +221,16 @@ def inactives(): inactives.append((feed, elapsed)) return render_template('inactives.html', inactives=inactives, nb_days=nb_days) +@app.route('/index_database/', methods=['GET']) +@login_required +def index_database(): + """ + Index all the database. + """ + user = models.User.objects(email=g.user.email).first() + fastsearch.create_index(user.feeds) + return redirect(url_for('home')) + @app.route('/search/', methods=['GET']) @login_required def search(): |