Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Making Websites with Flask/Routing

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

What is Routing? Routing basically means returning something to the user when they visit a specific URL on the site, which is called a route. In the Getting Started tutorial, we had two routes: the root route, /, and /hello. URL Building with Route Variables URL building is the practice of having dynamically served URLs, that are not built in. An example of this would be if you had a /user route, but the URL was formatted like /user/randomUser. In a Flask app without route variables, you would manually need to add each user with @app.route many times, but with Route Variables you can just say @app.route('/user/<name>'), and you can show the account page.0%