def upload(): if not request.files: return jsonify({'status': 'missing'}) try: data = request.files['inputCSV'] session['uploaded_filename'] = secure_filename(data.filename) if data and allowed_file(data.filename): return jsonify_csv(data) except Exception: print sys.exc_info()[0] return jsonify({'status': 'failed', 'message': 'Something went wrong trying to parse your csv file.'})
def upload(): if not request.files: return jsonify({'status': 'missing'}) try: data = request.files['inputCSV'] session['uploaded_filename'] = secure_filename(data.filename) if data and allowed_file(data.filename): return jsonify_csv(data) except Exception: print sys.exc_info()[0] return jsonify({ 'status': 'failed', 'message': 'Something went wrong trying to parse your csv file.' })
def test_csv(): session['uploaded_filename'] = secure_filename('testing') return jsonify_csv( open(join(abspath(dirname(__file__)), 'test/test_hat_genders.txt'), 'r'))
def upload(): data = request.files['inputCSV'] session['uploaded_filename'] = secure_filename(data.filename) if data and allowed_file(data.filename): return jsonify_csv(data)
def test_csv(): return jsonify_csv(open(join(abspath(dirname(__file__)), 'test/test_hat_standard.txt'), 'r'))
def upload(): data = request.files['inputCSV'] if data and allowed_file(data.filename): return jsonify_csv(data)
def test_csv(): return jsonify_csv( open(join(abspath(dirname(__file__)), 'test/test_hat_standard.txt'), 'r'))
def test_csv(): session['uploaded_filename'] = secure_filename('testing') return jsonify_csv(open(join(abspath(dirname(__file__)), 'test/test_hat_genders.txt'), 'r'))