Write the Code for the Templates
Explore how to write and test templates in Django using test-driven development. This lesson guides you through creating the homepage template, applying Bootstrap styling, and verifying your changes with unit tests to build a robust user interface.
We'll cover the following...
Our program’s user interface is created in this lesson. Even with TDD, we can start constructing a web application in a variety of ways. Some people begin by creating models, others by creating templates, and so on. All of these methods should lead to the same final project goal.
A good option is to start with the models to understand how to arrange the database before reconstructing the template. However, knowing how we want the web application to appear, at least in the early stages, is usually a good idea.
The template for the homepage
The ...