def save_changes(): data = CSVData() # save new info to source csvs data.write_info(request.get_json()) return jsonify({'saved': True})
def full_list(): info = CSVData().info squares = [{'filename': filename, 'title': sq['title'], 'sold': sq['sold'] == '1' or sq['snakes'] == '0', } for filename, sq in info.iteritems()] print squares return render_template('list.html', squares=sorted(squares, key=lambda sq: sq['title']))