install django rest framework
pip install djangorestframework
This command uses pip to install the Django REST framework.
INSTALLED_APPS = [
...
'rest_framework',
...
]
Add 'rest_framework' to the INSTALLED_APPS list in your Django project's settings file.