Skip to content

Commit

Permalink
made name changes in application.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kpostigo committed Feb 9, 2021
1 parent 9785633 commit c6e1ac7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions application.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
import pandas as pd
import static.scripts.utils as util

app = Flask(__name__,template_folder='./templates', static_folder='./static')
application = Flask(__name__,template_folder='./templates', static_folder='./static')

school_list = []
school_db = pd.read_csv('./db/school_list.csv')
data = ''
results = False

@app.route('/', methods=['POST', 'GET'])
@application.route('/', methods=['POST', 'GET'])
def home():
if request.method == 'POST':
school = request.form['school_name']
Expand All @@ -31,19 +31,19 @@ def home():
else:
return render_template("index.html", schoolList=school_list)

@app.route('/about')
@application.route('/about')
def about():
return render_template("about.html")

@app.route('/clear', methods=['POST'])
@application.route('/clear', methods=['POST'])
def clear():
# clear list if schools
school_list.clear()
# clear table...
results = False
return redirect(url_for('home', schoolList=school_list))

@app.route('/results', methods=['POST'])
@application.route('/results', methods=['POST'])
def results():
if school_list:
results = True
Expand Down

0 comments on commit c6e1ac7

Please sign in to comment.