Finally, we shall see how dynamic content can be interpolated
{{mycontent}}
(this literal text!) as content somewhere inside the main content block: <div class="content-box main-content">
...
{{mycontent}}
...
server.py
code (the second_page
function) to take in the desired value as a request parameter and pass it to the mycontent
template variable, e.g.: def second_page(): render_template("second.html", mycontent=request.args.get("mycontent", "<not specified>"))
mycontent
value as a GET
URL parameter (e.g., ?parameter=value
) and see if the content changes dynamically after the request!