Write the Code for the URLs
Write the code for the URLs and run the tests again.
We'll cover the following...
The URLs will be divided into two categories. We have the project and the application URLs. This lesson will cover the remaining steps involved in TDD.
The project and catalog URLs
Below is the complete code for the project and catalog URLs:
from django.urls import path from .views import home urlpatterns = [ path('', home, name='home') ]
The URLs for the Django project and application
Let’s start with the project URL. This can be found by navigating to the tdd_django
folder. Inside it, we see a urls.py
file that Django gives us by default. This is where our project URLs will reside.
...