In this lesson, you’re going to look at how to build routes. In the previous lesson, you tried a URL that doesn’t exist and got an error message that told you to check portfolio.url
.
When you check that file, you can see all of the URL patterns that exist there. If you try to go to /projects
, then you’ll see that it isn’t registered anywhere, so Django doesn’t know what to do with it. Fortunately, Django provides a lot of useful information in the comment at the top of that file.
Pygator on Oct. 12, 2019
I get this mistake when rerunning the server after adding to the urlpatterns:
File “<frozen importlib._bootstrap>”, line 1006, in _gcd_import File “<frozen importlib._bootstrap>”, line 983, in _find_and_load File “<frozen importlib._bootstrap>”, line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named ‘projects.urls’