def bball(): if request.method == 'POST': sortby = request.form['sortby'] sortorder = request.form['sortorder'] seasons = model.get_bball_seasons(sortby, sortorder) else: seasons = model.get_bball_seasons() return render_template("seasons.html", seasons=seasons)
def bball(): # need to be able to post on the url, so adding that in if request.method == 'POST': sortby = request.form['sortby'] sortorder = request.form['sortorder'] seasons = model.get_bball_seasons(sortby, sortorder) else: seasons = model.get_bball_seasons() return render_template("seasons.html", seasons=seasons)
def bball(): return render_template("seasons.html", seasons=model.get_bball_seasons())
if request.method == 'POST': sortby = request.form['sortby'] sortorder = request.form['sortorder'] seasons = model.get_bball_seasons(sortby, sortorder) else: seasons = model.get_bball_seasons() return render_template("seasons_fb.html", seasons=seasons) @app.route('/hello', methods=['GET', 'POST']) def hello(): if request.method == 'POST': firstname = request.form['firstname'] lastname = request.form['lastname'] else: firstname = '' lastname = '' return render_template("hello.html", firstname=firstname, lastname=lastname) if __name__ == '__main__': model.init_bball() model.get_bball_seasons() model.init_bball() model.get_fball_seasons() app.run(debug=True)
@app.route('/football', methods=['GET', 'POST']) def fball(): if request.method == 'POST': sortby = request.form['sortby'] sortorder = request.form['sortorder'] seasons = model.get_fball_seasons(sortby, sortorder) else: seasons = model.get_fball_seasons() return render_template("seasons.html", seasons=seasons) @app.route('/hello', methods=['GET', 'POST']) def hello(): if request.method == 'POST': firstname = request.form['firstname'] lastname = request.form['lastname'] else: firstname = '' lastname = '' return render_template("hello.html", firstname=firstname, lastname=lastname) if __name__ == '__main__': model.init_bball() print(model.get_bball_seasons()) app.run(debug=True)