title: I am not able to solve an error in flask for reset_password()
body: <pre><code>@app.route('/reset_password', method=['GET', 'POST'])
  def reset_request():
    if current_user.is_authenticated:
      return redirect(url_for('home'))
    form = RequestResetForm()
    if form.validate_on_submit():
      user = user.query.filter_by(email=form.email.data).first()
      send_reset_email(user)
      flash('An email has been sent with instructions to reset your password', 'info')
      return redirect(url_for('login_context'))
    return render_template('reset_request.html', title='Reset Password', form = form)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/QKRh7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QKRh7.png" alt="this is the error!!" /></a></p>
  <p>this is what I coded. I want to create a reset password function. I am unable to decode what that error says.</p>
  <p>error:</p>
  <pre><code>def reset_request():
    File &quot;C:\Program Files (x86)\Python38-32\lib\site-packages\flask\app.py&quot;, line
   1315, in decorator
      self.add_url_rule(rule, endpoint, f, **options)
    File &quot;C:\Program Files (x86)\Python38-32\lib\site-packages\flask\app.py&quot;, line
   98, in wrapper_func
      return f(self, *args, **kwargs)
    File &quot;C:\Program Files (x86)\Python38-32\lib\site-packages\flask\app.py&quot;, line
   1275, in add_url_rule
      rule = self.url_rule_class(rule, methods=methods, **options)
  TypeError: __init__() got an unexpected keyword argument 'method'
  </code></pre>