Example #1
0
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)
Example #2
0
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)
Example #3
0
File: app.py Project: rkulk98/lec24
def bball():
    return render_template("seasons.html", seasons=model.get_bball_seasons())
Example #4
0
    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)
Example #5
0
@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)