Complete the code to capture an integer parameter named 'pk' in the URL pattern.
path('item/[1]', views.item_detail, name='item-detail')
In Django URL patterns, integer parameters are captured using <int:parameter_name> syntax. Here, <int:pk>/ captures an integer named 'pk'.
Complete the code to capture a string parameter named 'username' in the URL pattern.
path('profile/[1]', views.profile_view, name='profile')
The <str:username>/ pattern captures a string parameter named 'username' in the URL.
Fix the error in the URL pattern to correctly capture a slug parameter named 'post_slug'.
path('blog/[1]', views.post_detail, name='post-detail')
The correct syntax to capture a slug parameter is <slug:post_slug>/ including the trailing slash.
Fill both blanks to capture an integer 'year' and a string 'month' in the URL pattern.
path('archive/[1]/[2]', views.archive_view, name='archive')
The URL pattern captures an integer 'year' with <int:year> and a string 'month' with <str:month>.
Fill all three blanks to capture a slug 'category', an integer 'id', and a string 'action' in the URL pattern.
path('manage/[1]/[2]/[3]/', views.manage_view, name='manage')
The URL pattern correctly captures a slug 'category', an integer 'id', and a string 'action' using angle brackets with types.