Complete the code to import the function needed to define URL patterns in Django.
from django.urls import [1]
The path function is used to define URL patterns in Django's URL configuration.
Complete the code to define a URL pattern that connects the root URL to the home view.
urlpatterns = [
[1]('', home, name='home'),
]The path function defines URL patterns, mapping the empty string '' to the home view.
Fix the error in the URL pattern by completing the missing part to import views correctly.
from . import [1] urlpatterns = [ path('', [1].home, name='home'), ]
Views are imported from the views module to connect URL patterns to view functions.
Fill both blanks to include another app's URLs under the 'blog/' path.
urlpatterns = [
path('blog/', [1]('[2].urls')),
]The include function is used to include URL patterns from another app, here the 'blog' app's urls.
Fill all three blanks to create a URL pattern that captures an integer 'post_id' and calls the 'post_detail' view.
urlpatterns = [
path('[1]/<[2]:post_id>/', [3].post_detail, name='post_detail'),
]The URL pattern captures an integer parameter named 'post_id' under the 'blog' path and calls the 'post_detail' view from the views module.