flask route

How To Generate URL And Route Dynamically In Flask

We can set route dynamically instead of fixed route. For example In the pre-determined route links generate like this example.com/users/profile In the dynamically gendered route will be like this example.com/users/custom_profile_name We will use @app.route(‘/<username>’) The code will be like this We can use anything in the <username> here So if we load page like example.com/anything_here […]