From e4d9d0f17be395d7a31a4328dd04c2ad0b35f4f3 Mon Sep 17 00:00:00 2001 From: Jocavdh Date: Mon, 11 Jun 2018 14:49:05 +0200 Subject: [PATCH] Removed some printouts --- app/static/js/app.js | 1 - app/views.py | 10 +++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/static/js/app.js b/app/static/js/app.js index 992e2bf..b920178 100755 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -182,7 +182,6 @@ $(document).ready(function() q: request.term, // in flask, "q" will be the argument to look for using request.args }, function(data) { response(data); // matching_results from jsonify - console.log("this" + data); }); }, search: function() { diff --git a/app/views.py b/app/views.py index 078f4e7..3202b07 100755 --- a/app/views.py +++ b/app/views.py @@ -445,20 +445,16 @@ def autocomplete_search(): #query = request.form['search'] query = request.args.get('q') query_tokenized = query.lower().split() - print(query_tokenized) + #print(query_tokenized) word_1 = query_tokenized[-2] word_2 = query_tokenized[-1] - print(word_1) - print(word_2) + #print(word_1) + #print(word_2) autocomplete_output = autocomplete.predict(word_1 , word_2) autocomplete_suggestions.clear() for suggestion, score in autocomplete_output: autocomplete_suggestions.append(suggestion) - session['autocomplete_suggestions'] = str(autocomplete_suggestions) - - print(session['autocomplete_suggestions']) - return Response(json.dumps(autocomplete_suggestions), mimetype='application/json')