title: Python: Django Requests
body: <p>I am hosting Ubuntu on VMware Player, and I am working with Django using eclipse neon,Pydev, Anaconda3, it worked fine the request/response on the same machine(Ubuntu), but when sending a request from my windows to the hosted machine the following happens:
  - Request sent successfully.
  - No Response received.</p>
  
  <p>Here is my code:</p>
  
  <p>On Ubuntu:</p>
  
  <p>-Django Code:</p>
  
  <pre><code>@api_view(['GET', 'POST'])   
  def PredictLocations(request):
  
  if request.method == 'GET':
      locations = Locations.objects.all()
      serilaizer = LocationSerializers(locations, many=True)
      return Response(serilaizer.data)
  
  elif request.method == 'POST':
      serializer = LocationSerializers(data=request.data)
      if serializer.is_valid():
  
  
          return HttpResponse('Hey')
      return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p>-Post Request:</p>
  
  <pre><code>import requests,json
  
  url = 'http://localhost:8000/locations/'
  
  payload = {"X": 1.0, "Y": 0.0, "Z": 10.0, "isSafe": 2}
  
  headers = {'content-type': 'application/json'}
  
  r = requests.post(url, data=json.dumps(payload), headers=headers)
  
  print(r.status_code, r.reason, r.text)
  </code></pre>
  
  <p>On Windows:</p>
  
  <pre><code>import requests,json
  
  url = 'http://UbuntuIp:8000/locations/'
  
  payload = {"X": 1.0, "Y": 0.0, "Z": 10.0, "isSafe": 2}
  
  headers = {'content-type': 'application/json'}
  
  r = requests.post(url, data=json.dumps(payload), headers=headers)
  
  print(r.status_code, r.reason, r.text)
  </code></pre>
  
  <p>What do you think the problem is?</p>