Django Rest Framework - Authentication

How to disable authentication for a specific view?

You need to import following classes

from rest_framework.decorators import api_view, authentication_classes, permission_classes

Then, if you want to disable an api view in your views.py file, add authentication and permission classes as emply list, it will disable Token based authentication in django rest framework

@api_view(['GET'])
@authentication_classes([])
@permission_classes([])
def nav_bar(request):
   ...
   ...