gasweb.py 811 Bytes
Newer Older
Saikiran Srirangapalli's avatar
Saikiran Srirangapalli committed
1
import gradaudit.util as util
2
from flask import Flask, render_template, request
3
from response import Response
4 5 6 7 8 9 10 11

app = Flask(__name__)


@app.route('/')
def input_form():
    return render_template('GASGUI.html')

12 13 14 15
@app.route('/upload',methods=['POST'])
def  upload():
	return render_template('GASGUI.html')
	
16 17
@app.route('/submit', methods=['POST'])
def submit():
18
    name = request.form['name'].lower()
19 20 21 22 23
    degree = request.form['degreeType']
    major = request.form['MajorList']
    year = request.form['YearList']
    spec = request.form['SpecializationOfDegree'].lower()
    classes = request.form['classesTaken'].replace(' ','')
Saikiran Srirangapalli's avatar
Saikiran Srirangapalli committed
24
    transcript = util.Transcript(name, degree, major, year, spec, classes)
25
    
Saikiran Srirangapalli's avatar
Saikiran Srirangapalli committed
26
    resp = Response(transcript)
27
    
28
    return render_template('GASTemplate.html', response=resp)