Complete the code to import the function used for reverse URL resolution in Django.
from django.urls import [1]
The reverse function is imported from django.urls to perform reverse URL resolution.
Complete the code to reverse the URL named 'home'.
url = reverse('[1]')
The URL name given in the reverse function must match the name defined in your URL patterns. Here, it is 'home'.
Fix the error in reversing a URL that requires an argument 'pk'.
url = reverse('detail', args=[[1]])
The args list must contain the actual value for the URL parameter, such as an integer like 1, not the variable name.
Fill both blanks to reverse a URL named 'profile' with a keyword argument 'username'.
url = reverse('[1]', kwargs={{'[2]': 'john'}})
The first blank is the URL name 'profile'. The second blank is the keyword argument key 'username' matching the URL pattern.
Fill all three blanks to reverse a URL named 'article-detail' with keyword arguments 'year' and 'slug'.
url = reverse('[1]', kwargs={{'[2]': 2024, '[3]': 'django-tutorial'}})
The URL name is 'article-detail'. The keyword arguments keys must match the URL parameters: 'year' and 'slug'.