Added delete button

This commit is contained in:
FrederikBaerentsen 2024-04-18 12:51:09 +02:00
parent 4a3f7dc1e9
commit 44f9ee45fd

6
app.py
View File

@ -24,6 +24,12 @@ def delete(tmp):
if request.method == "GET":
print("GET")
print(tmp)
tables = ['inventory', 'sets', 'minifigures', 'missing']
for t in tables:
cursor.execute('DELETE FROM ' + t + ' where u_id="' +tmp+ '";')
conn.commit()
cursor.close()
conn.close()
return redirect('/')
@app.route('/create',methods=['GET', 'POST'])