I would like to add on to all the answers
if you want to run django server on your phone follow the steps
step 1 -> run powershell type ipconfig for windows ( for mac type grep inet)
ipconfig
step 2 -> find your phone's ip address it will be of the form 198.168... type in the ip4address in the results you got from step 1.
you should be connected to the same wifi or lan to do so. So connect through hotspot ok!
step 3 -> now add this ip4 address to your setting.py of django project
ALLOWED_HOSTS = ['192.168.43.103']
**remember to add your ip4 address rather than this one **
step 4 -> after you found your ip4 address of phone now run your django project with some port. Say (your ip4 address):port here 198.168.43.103 is my ip4 address and 8000 is port (you can choose any port but i recommend make it upto 4 digits)
python manage.py runserver 198.168.43.103:8000
your operating system might ask permission to allowed your network to be viewed on other devices since it is safe for development purpose, allow it to access
step 5 -> open your android to which your are connected with network and open its browser and open your link to which you run the server in django. In my case it is -
198.168.43.103:8000
you can see the project voila!
for support mark this answer as useful