I am new to Django. I have created an API named http://127.0.0.1:8000/api/update/1/
and it works perfectly in the browser and on the Postman app.
Howev
Please run your django development server using the following command.
python manage.py runserver 0.0.0.0:8000
Once you get it running, in a new terminal window find out the ip address of your computer in your wifi/network subnet using the following command
Ipconfig or ifconfig (depends on your OS)
Then change the base url of your api from 127.0.0.1 to the ip you found in the above step. Now connect the android phone in which your app is being tested to your same wifi or network to which the computer running django is connected. Now you can request and receive response.
127.0.0.1 is the home of your system, your android app will not be able to access that. You need to do it like this.