In the previous lesson, you learned how to pull one specific resource out of your database. Now you need to build that code into your views and set up the correct routing so that you’ll be able to see the details page of one of your projects.
In urlpatterns
in your projects
app, you had an empty path that just went to projects
without anything afterwards and then rendered your all_projects
view. Now, you need to add a second path:
urlpatterns = [
path('', views.all_projects),
path('<int:pk>', views.project_detail)
]
You can use the characters <
and >
to captures a part of a URL and pass it forward into your app.
eclaudio on Dec. 4, 2019
i love your tutorails!!!