This commit is contained in:
batikano1 2021-12-03 06:48:35 +01:00
commit fd20cd6319
3 changed files with 19 additions and 5 deletions

19
app.py
View File

@ -25,12 +25,21 @@ def sauveteur(idsauveteur):
def bateau(idbateau): def bateau(idbateau):
return pages.bateau(idbateau) return pages.bateau(idbateau)
@app.route('/modifications') @app.route('/modifications', methods=['GET', 'POST'])
@app.route('/modifications/') @app.route('/modifications/', methods=['GET', 'POST'])
@app.route('/modification') @app.route('/modification', methods=['GET', 'POST'])
@app.route('/modification/') @app.route('/modification/', methods=['GET', 'POST'])
def modifs(): def modifs():
return pages.modifs() if request.method == 'POST':
nom = request.form["nom"]
prenom = request.form["prenom"]
mail = request.form["email"]
article = request.form["article"]
modif = request.form["modif"]
pages.suggestion(nom,prenom,mail,article,modif)
return pages.main()
else:
return pages.modifs()
@app.route('/expeditions/<int:idexpe>') @app.route('/expeditions/<int:idexpe>')
@app.route('/expedition/<int:idexpe>') @app.route('/expedition/<int:idexpe>')

View File

@ -112,3 +112,8 @@ def search(texte):
results.append(r) results.append(r)
return render_template("searchresults.html",liste=results) return render_template("searchresults.html",liste=results)
<<<<<<< HEAD
=======
def suggestion(nom,prenom,mail,article,modif):
lib.ex_sql(dbname,"INSERT INTO suggestion(prenom, nom, mail, nomarticle, suggestion) VALUES (?, ?, ?, ?, ?);",(nom,prenom,mail,article,modif))
>>>>>>> a1f4410335d7d6e3a90df8e4ded6d7fa2478086f

BIN
site.db

Binary file not shown.