django-urls-2

Last Updated :
Discuss
Comments

What is the effect of using path('books/<int:pk>/', views.book_detail, name='book_detail') in a urls.py file?

It captures an integer value from the URL and passes it as pk to views.book_detail

It matches only URLs exactly named “books”

It creates a database table for books

It disables routing for “books” URLs

Tags:
Share your thoughts in the comments