[Django]-Django Rest Framework: Set Permissions for function view

8👍

✅

You can use the permission_classes decorator like this:

  @api_view(['GET'])
  @permission_classes((IsAuthenticated, ))
  def activate(request, uidb64, token):
....

Leave a comment