def search(): searched_phrase = str(request.form['searched_phrase']) filtered_questions = data_manager.search(searched_phrase) filtered_answers = data_manager.search_answer(searched_phrase) return render_template("search_result.html", questions=filtered_questions, answers=filtered_answers)
def route_search(): limit = False search_mode = True search_text = request.args.get('q') question_data = data_manager.search(search_text) return render_template("list.html", question_data=question_data, search_mode=search_mode, limit=limit)
def search(): try: userid = data_manager.get_user_id(session['username']) except KeyError: userid = '' search = '%' + request.args.get('search') + '%' questions = data_manager.search(search) return render_template('main.html', questions=questions, search=search, user_id=userid)
def search(): user_id = data_manager.get_userid_by_username(session.get('username')) search_phrase = request.form['search_phrase'] headers = data_manager.get_column_names_of_table(data_manager.question_db) questions = data_manager.search(search_phrase) answers = data_manager.search_answers(search_phrase) return render_template('search_results_head.html', questions=questions, answers=answers, headers=headers, search_phrase=search_phrase, user_id=user_id)
def search(): phrase = request.args.get('search_text') if phrase == '': flash('Insert letters') return redirect(request.referrer) else: search_text = data_manager.search(phrase) answers = data_manager.get_answer() return render_template('search.html', search_text=search_text, phrase=phrase, answers=answers)
def search_phrase(): if request.method == 'POST': search_phrase = request.form['search_phrase'] search_question = data_manager.search(search_phrase) answers = answers_data.get_all_answers() return render_template("search_questions.html", headers=QUESTIONS_HEADERS, headers_print=HEADERS_PRINT, questions=search_question, search_phrase=search_phrase, re=re, answers=answers)
def search(): search_result = data_manager.search(*request.args.values()) return render_template('search.html', search_result=search_result)
def search(): search_data = request.form.to_dict() result = data_manager.search(search_data['query']) return render_template('search_result.html', result=result)
def search(): search_phrase = request.args.get('phrase') questions = data_manager.search(search_phrase) return render_template('index.html', questions=questions)
def search(): search_phrase = request.args.get('search_phrase') results = data_manager.search(search_phrase) return render_template('search.html', results=results, search_phrase=search_phrase)