Implemented temporary response

Currently returns transcript
parent f300d984
from flask import Flask, render_template
import os
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def hello_world():
return render_template('GASGUI.html')
def input_form():
return render_template('GASGUI.html')
@app.route('/submit', methods=['POST'])
def submit():
name = request.form['name'] + '\n'
degree = request.form['degreeType'].lower()
major = request.form['MajorList'].lower()
year = request.form['YearList'] + ','
spec = request.form['SpecializationOfDegree'].lower()
classes = request.form['classes'] + '\n'
transcript = '{0}'\
'{1},{2},{3}'\
'{4}'\
'{5}'.format(name, degree, major,
year, spec, classes)
with open('temp.csv', 'w') as fil:
fil.write(transcript)
#response = os.popen('./temp.sh').read()
return transcript
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment