I have the following setup:
The rendering page:
@app.route('/one', methods=['GET'])
def one():
form = AnyForm()
return render_template(
'form.html', form=form
)
The template (stripped to the basic):
{{ wtf.quick_form(form, action=url_for('two')) }}
The route/function including the logic
@app.route('/two', methods=['POST'])
def two(form):
print('FORMDATA: ' + form)
return redirect(url_for('one'))
The error is:
TypeError: two() missing 1 required positional argument: 'form'
How do I handle this?