コード例 #1
0
def sql_insert_sighting():
    from sqlquery import sql_query, insert_sighting
    if request.method == 'POST':
        name = request.form['name']
        person = request.form['person']
        location = request.form['location']
        sighted = request.form['sighted']
        insert_sighting(name, person, location, sighted)
    tuples = sql_query("SELECT * FROM SIGHTINGS")
    return render_template('sightings.html', tuples=tuples)
コード例 #2
0
def sql_update_flower():
    from sqlquery import update_flower, sql_query
    if request.method == 'POST':
        oldComname = request.form['oldComname']
        newComname = request.form['newComname']
        newGenus = request.form['newGenus']
        newSpecies = request.form['newSpecies']
        update_flower(oldComname, newComname, newGenus, newSpecies)
    tuples = sql_query("SELECT * FROM FLOWERS")
    return render_template('flowers.html', tuples=tuples)
コード例 #3
0
def sql_members_database():
    from sqlquery import sql_query
    tuples = sql_query("SELECT * FROM MEMBERS")
    return render_template('members.html', tuples=tuples)
コード例 #4
0
def sql_features_database():
    from sqlquery import sql_query
    tuples = sql_query("SELECT * FROM FEATURES")
    return render_template('features.html', tuples=tuples)
コード例 #5
0
def sql_flowers_database():
    from sqlquery import sql_query
    tuples = sql_query("SELECT * FROM FLOWERS")
    return render_template('flowers.html', tuples=tuples)
コード例 #6
0
def sql_sighting_database():
    from sqlquery import sql_query
    tuples = sql_query("SELECT * FROM SIGHTINGS")
    return render_template('sightings.html', tuples=tuples)