title: Django rest framework. If user exist return True, False if not
body: <p>Need to preform simple check: If user exist return True, False if not.I am trying to solve thise problem using custom json answers, not sure it is the right way to deal with it. Please help me .</p>
  
  <p>My serializer:</p>
  
  <pre><code>User = get_user_model()
  
  Class UserSerializer(serializers.ModelSerializer):
      class Meta:
          model = User
          fields = (User.USERNAME_FIELD, )
  </code></pre>
  
  <p>My views:</p>
  
  <pre><code>@api_view(['GET'])
  def UserViewSet(self, request):
      if request.method == 'GET':
          try:
              user = User.objects.get(username=User.USERNAME_FIELD)
              if User.DoesNotExist:
                  json = {}
                  json['message']= 'False'
                  return Response(json)
              else:
                  json = {}
                  json['message']= 'True'
                  return Response(json)
  </code></pre>