Introduction
In this lab, we will learn how to create and use templates in Flask. Templates are a crucial part of web applications. They allow us to generate dynamic HTML pages that can display different data each time they are loaded. We'll be using the Jinja2 template engine that comes bundled with Flask.
Note: You need to create the code file yourself and run it in the environment. You can preview the Flask service status on Web 5000.
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
flask(("`Flask`")) -.-> flask/CoreConceptsGroup(["`Core Concepts`"])
flask(("`Flask`")) -.-> flask/DataHandlingGroup(["`Data Handling`"])
flask/CoreConceptsGroup -.-> flask/application_object("`Application Object`")
flask/DataHandlingGroup -.-> flask/incoming_request_data("`Incoming Request Data`")
flask/DataHandlingGroup -.-> flask/response_objects("`Response Objects`")
flask/CoreConceptsGroup -.-> flask/useful_internals("`Useful Internals`")
subgraph Lab Skills
flask/application_object -.-> lab-136338{{"`Flask Template Creation`"}}
flask/incoming_request_data -.-> lab-136338{{"`Flask Template Creation`"}}
flask/response_objects -.-> lab-136338{{"`Flask Template Creation`"}}
flask/useful_internals -.-> lab-136338{{"`Flask Template Creation`"}}
end