Skip to content
Advertisement

How to pass values to return redirect(url_for()) from one method to another in flask

  • I have a method in this I am extracting email id and mobile number from the database.
  • I am using POSTGRES as database and using python language.I need to pass the value to the second method for the OTP purpose but I am running into an error.
JavaScript
  • I have another method I need to access the email id and mobile number in this method that is passed from the above userlogin() method
JavaScript
  • Right now I am getting this error during execution enter image description here

Advertisement

Answer

Solved. I just don’t have to assign new variable in this method @app.route("/otp/<email>/<mobile>", methods=['GET', 'POST'])

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement