def delete(item_id, is_question): if is_question == 'True': data_handler.delete_question(item_id) else: data_handler.delete_answer_comments(item_id) data_handler.delete_answer(item_id) return redirect('/list')
def route_delete_question(question_id): question = data_handler.get_data_by_question_id('question', question_id)[0] if question['username'] != session['username']: return redirect( url_for('route_question_by_id', question_id=question_id)) data_handler.delete_question(question_id) return redirect('/')
def route_delete_question(question_id): for item in data_handler.get_answer_ids_with_question_id(question_id): data_handler.delete_answer(item) data_handler.delete_question(question_id) return redirect('/list')
def delete_question(question_id): data_handler.delete_question(question_id, app) return redirect(url_for('show_questions'))
def del_record(question_id): data_handler.delete_question(question_id) return redirect('/list')
def delete_question(question_id): data_handler.delete_image_by_question_id(question_id) data_handler.delete_question(question_id) data_handler.delete_answers_by_question_id(question_id) return redirect('/lists')
def delete_question(question_id): data.delete_question(question_id) return redirect('/')