Formulaire de suggestion fonctionnel
This commit is contained in:
parent
d4174e3ed0
commit
ac29bde193
19
app.py
19
app.py
@ -25,12 +25,21 @@ def sauveteur(idsauveteur):
|
||||
def bateau(idbateau):
|
||||
return pages.bateau(idbateau)
|
||||
|
||||
@app.route('/modifications')
|
||||
@app.route('/modifications/')
|
||||
@app.route('/modification')
|
||||
@app.route('/modification/')
|
||||
@app.route('/modifications', methods=['GET', 'POST'])
|
||||
@app.route('/modifications/', methods=['GET', 'POST'])
|
||||
@app.route('/modification', methods=['GET', 'POST'])
|
||||
@app.route('/modification/', methods=['GET', 'POST'])
|
||||
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('/expedition/<int:idexpe>')
|
||||
|
3
pages.py
3
pages.py
@ -116,3 +116,6 @@ def search(texte):
|
||||
|
||||
results.append(r)
|
||||
return render_template("searchresults.html",liste=results)
|
||||
|
||||
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))
|
||||
|
Loading…
Reference in New Issue
Block a user