1

I'm trying to create a verification program where a user goes to a URL and then they get verified.

For each user, I want to create a new url example.com/verificationUser, for user 2 it'd be example.com/verificationUser2.

How can I set a "dynamic" app route in Flask?

@app_route(dynamic)
def do_this():
   return "hello"

I want the same function to run on a new app route. so both example.com/verificationUser and example.com/verificationUser2 get returned hello

1 Answer 1

2

That's how you do it

@app.route('/verification/<name>')
def profile(name):
    return f'Hello {name}'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.