def delete(id): store = Store.delete().where(Store.id == id) if store.execute(): flash('Succesfully deleted store', "success") return redirect(url_for('show')) else: flash('Failed to delete store', "danger") return render_template('store.html')