How to Solve NameError: name 'permissions' is not defined -- rest_framework

Solution: Import the 'permissions' module

# Add the following line to the top of your code
from rest_framework import permissions

 

For more information:
rest_framework permissions