In Flask, what is the purpose of the route() decorator?

  • It authenticates user access to certain routes
  • It defines the routing logic for the application
  • It defines the schema for the database
  • It specifies the URL for the static files
In Flask, the @app.route() decorator is used to define the routing logic for the application. It associates a URL with a Python function, allowing you to determine what should happen when a user accesses a particular URL.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *