Purpose: The transformation from Project Part 1 to Project Part 2 starts with refactoring and migration, which are important principles in any coding, but especially web coding. "Refactoring" means changing the structure of code without changing what any of it does. "Migration" is more extensive, changing things like platform, communication, or data handling, but keeping function the same. Your will migrate to Flask, refactor the templates, then add data-driven features (another migration).
Please do these exercises in order. The structure and order is important. Start with your Project Part 1 code with its AJAX Includes. In Exercise 2.4B, you migrate to Flask without changing ANY HTML or JS content. Doing it this way teaches important principles. In Exercises 2.4C and 2.4D, you watch your code get smaller as you change from AJAX Includes to Jinja Includes to Layouts. In Exercises 2.4E and 2.4F, you add data-driven features and organize your code into the MVC pattern.
Exercise 2.4B: Reorganize Static to Flask Without Changing HTML
Exercise 2.4C: Translate AJAX Includes to Flask Includes
Exercise 2.4D: Inherited Layouts to Simplify Templates
Exercise 2.4E JSON Data Driven Loops (Nav, Professional, Service)