Complete the code to capture an integer parameter named 'year' in the URL pattern.
path('archive/<[1]:year>/', views.archive, name='archive')
The int converter captures integer values from the URL and passes them as integers to the view.
Complete the code to capture a slug parameter named 'post_slug' in the URL pattern.
path('post/<[1]:post_slug>/', views.post_detail, name='post_detail')
The slug converter matches letters, numbers, underscores, or hyphens, suitable for slugs.
Fix the error in the URL pattern to correctly capture a UUID parameter named 'user_id'.
path('user/<[1]:user_id>/', views.user_profile, name='user_profile')
The uuid converter matches UUID strings and converts them to UUID objects.
Fill both blanks to capture a string parameter 'username' and an integer parameter 'page' in the URL pattern.
path('profile/<[1]:username>/page/<[2]:page>/', views.profile_page, name='profile_page')
The str converter captures any non-empty string for 'username', and int captures an integer for 'page'.
Fill all three blanks to create a URL pattern capturing a slug 'category', an integer 'year', and a UUID 'item_id'.
path('shop/<[1]:category>/<[2]:year>/<[3]:item_id>/', views.shop_item, name='shop_item')
The slug converter captures the category text, int captures the year as a number, and uuid captures the item ID in UUID format.