Challenge 1: Write an App's urls.py — Possible Solution ==================================================================== # catalog/urls.py from django.urls import path from . import views urlpatterns = [ path("", views.book_list, name="book-list"), path("/", views.book_detail, name="book-detail"), path("category//", views.by_category, name="book-category"), ] WHY THIS WORKS -------------- - path("", views.book_list, name="book-list") matches the app's own root (whatever prefix it ends up included under) with an empty string — this is the standard way to express "the index/list page for this app." - path("/", ...) uses the built-in `int` converter, so `book_id` arrives at the view already converted to a Python int — a request for "/abc/" (non-numeric) won't even match this pattern, Django will just try the next one (or return a 404 if nothing matches). - path("category//", ...) captures everything after "category/" up to the next slash as a string named `slug` — `str` is also the default converter, so `` alone would behave identically, but being explicit keeps the pattern self-documenting. - Every route has a distinct `name` — this is what makes Challenge 3's `reverse()` pattern possible later, and it costs nothing to add now.