def edit(id): a = Alert.getById(id) if request.method == 'POST': p = request.form.get('p') a.updatePriceLimit(float(p)) return redirect(url_for('alertBp.all')) return render_template('alerts/edit.html', a=a)