July 2019
Beginner to intermediate
302 pages
9h 38m
English
Now, if we open the http://127.0.0.1:5000/hello URL in a browser, we should see a response similar to the one shown in the following screenshot:

If we pass a URL argument with the user key as http://127.0.0.1:5000/hello?user=John, we should see the following response:

As we can see in views.py, the argument passed in the URL is fetched from the request object using request.args.get('user') and then passed to the context of the template being rendered using render_template. The argument is then parsed using the Jinja2 placeholder, ...