Esempio n. 1
0
    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)

@app.route('/football', methods=['GET', 'POST'])
def football():
    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)

if __name__ == '__main__':
    model.init_bball()
    app.run(debug=True)
Esempio n. 2
0
        <ul>
            <li><a href="/bball"> Men's Basketball </a></li>
        </ul>
    '''
@app.route('/bball', methods=['GET', 'POST'])
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", sport="Men's Basketball",
         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('umbball.csv')
    #print(model.get_bball_seasons())
    app.run(debug=True)