title: Django REST API custom methods for generic views
body: <p>I'm intern and work on a project where I develop DRF API that need to interact with mobile app written by my colleague with Ionic framework.
  We are creating new user. My view method is following:</p>
  
  <pre><code>class NewUser(generics.CreateAPIView):
      model = User
      permission_classes = [permissions.AllowAny]
      serializer_class = NewUserSerializer
  
      def create(self, request, *args, **kwargs):
          serializer = self.get_serializer(data=request.data)
          serializer.is_valid(raise_exception=True)
          self.perform_create(serializer)
          headers = self.get_success_headers(serializer.data)
          token, created = Token.objects.get_or_create(user=serializer.instance)
          return Response({'token': token.key}, status=status.HTTP_201_CREATED, headers=headers)
  </code></pre>
  
  <p>When someone wants to create new user via POST request if user name has't been taken yet, then API return 201 status code and token in JSON, if user name already taken it returns 400 status and error message in JSON. MY colleague request me to change status message to 200 when he tries to create username with name that already exist. He says that he can't consume the ERROR response.
  His code looks like:</p>
  
  <pre><code>$http.post(url,{
  username:$scope.tel,
  password:$scope.passwd
  }).success(function(data){
  alert(data);
  $ionicLoading.hide();
  console.log(data);
  })
  </code></pre>
  
  <p>Question:
  1) Should I tweak my API to send 200 status instead of more logical 400 for 'user already register' error?
  I tried to change my code, But i couldn't find the method to override in CreateAPIView/ModelSerializer of DRF. I ended up rewriting my view class to method:</p>
  
  <pre><code>@api_view(['POST'])
  def newUser(request):
      """
      Saves a new user on the database
      """
      if request.method == 'POST':
  
          serializer = NewUserSerializer(data=request.data)
          if serializer.is_valid():
              serializer.save()
              token, created = Token.objects.get_or_create(user=serializer.instance)
              return Response({'token': token.key}, status=status.HTTP_201_CREATED, headers=serializer.data)
          else:
              return Response(serializer.errors, status=status.HTTP_200_OK)
  </code></pre>
  
  <p>Question:
  2) If I want to change behaviorof API and responce, which method should I override
  3) I'm new to Django and still don't qiute know where we should use generic views VS. @.... methods</p>