title: Authentication infromation is not provided when I use Django rest framework
body: <p>I use the Django Rest Framework, but there seems I can not access, need permission to do this:</p>
  
  <blockquote>
    <p>Authentication infromation is not provided. </p>
  </blockquote>
  
  <p><kbd><a href="https://i.stack.imgur.com/467EP.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/467EP.jpg" alt="enter image description here"></a></kbd></p>
  
  <h2>How to resolve this issue?</h2>
  
  <p><strong>EDIT -1</strong></p>
  
  <p>My code in my views.py:</p>
  
  <pre><code>@api_view(['GET', 'POST'])
  def task_list(request):
      '''
      List all tasks, or create a new task.
      '''
      if request.method == 'GET':
          tasks = Task.objects.all()
          serializer = TaskSerializer(tasks, many=True)
          return Response(serializer.data)
      elif request.method == 'POST':
          serializer = TaskSerializer(data=request.data)
          if serializer.is_valid():
              serializer.save()
              return Response(serializer.data, status=status.HTTP_201_CREATED)
          else:
              return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  
  
  # detail
  @api_view(['GET', 'PUT', 'DELETE'])
  def task_detail(request, pk):
      try:
          task = Task.objects.get(pk=pk)
      except Task.DoesNotExist:
          return Response(status=status.HTTP_404_NOT_FOUND)
  
      if request.method == 'GET':
          serializer = TaskSerializer(task)
          return Response(serializer.data)
      elif request.method == 'PUT':
          serializer = TaskSerializer(task, data=request.data)
          if serializer.is_valid():
              serializer.save()
              return Response(serializer.data)
          else:
              return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
      elif request.method == 'DELETE':
          task.delete()
          return Response(status=status.HTTP_204_NO_CONTENT)
  </code></pre>