Complete the code to install Django REST Framework using pip.
pip install [1]The correct package name to install Django REST Framework is djangorestframework.
Complete the code to add 'rest_framework' to the Django project's installed apps.
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
[1],
]The correct app name to add is 'rest_framework' to enable Django REST Framework.
Fix the error in the import statement to use Django REST Framework's routers.
from rest_framework import [1]
The routers module is imported from rest_framework to help with URL routing.
Fill both blanks to register a viewset with the router.
router = DefaultRouter() router.[1]('[2]', MyViewSet)
The register method registers a viewset with a URL prefix, here given as a string like 'urls'.
Fill all three blanks to include the router URLs in the Django project's URL patterns.
from django.urls import path, include urlpatterns = [ path('api/', include(router.[1])), path('admin/', admin.[2].[3]), ]
The router's urls attribute provides the URL patterns. The admin site is accessed via admin.site.urls.