Flask App routing
- It is used to map the specific URL function that is intended to perform some task. The output of that function is rendered on the webpage.
- In Our first application, the URL ('/') is associated with the home function that returns a specific string displayed on the web page.
- Here, You can reuse the variable by adding that as a parameter into the view function.
Flask App Routing Output
- The converter can be used in the URL to map the particular variable to the specified data type. For Ex, You can provide it integer or float like age.
int or float
App Routing Converter
- These converters are used to convert the default string type to the associated data type.
- string: Default
- int: Convert the string to the integer
- float: Convert the string to the float
- path: It can accept the slashes given in the URL
- add_url() function is used to perform routing for the flask Web application.
If you want to learn about Python Course , you can refer the following links Python Training in Chennai , Machine Learning Training in Chennai , Data Science Training in Chennai , Artificial Intelligence Training in Chennai