def get_saved_task(): if 'load_task' not in session: return jsonify({'task': 'False'}) user= session['user'] save_name= session['load_task']['save_name'] task = db.get_task(user, save_name) return jsonify({'task':task})
def load_task(task_name): user = session['user'] result = dicter(db.get_task(user, task_name)) session['load_task'] = {} #clear out anything in there session['load_task']['params'] = result['data'] session['load_task']['save_name'] = result['save_name'] session['text_id'] = result['text_id'] return redirect(url_for('frequencies'));