4.2 Revisiting Hello World: The Advantages of Templates

In Chapter 2, we built a single webpage that displayed the text Hello World! to the user. Building a webpage was a two-step process: we first defined what the webpage would display, and then we defined the URL that identified that webpage. Both of these steps are part of MVC architecture’s Controller, which we examine in Chapter 5: Creating Webpages with Controllers in Django.

In Chapter 2, Section 2.5, we discussed the fact that a dynamic website needs to use all three MVC components. In particular, we discussed the ability to generate webpages automatically based on data in a database. We can now communicate with a database, and to best illustrate the utility of the MVC View component, ...

Get Django Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.