Getting a site to layout well on mobile can be tricky. Although there are some decent mobile emulators, I still frequently run into important differences when I view it on a real phone.
Web pages for the desktop are easy to test using the Django development server. This note describes how to browse the development server from a mobile device that is on the same LAN as the server.
- Connect to the LAN with your phone
- Get the local IP address of the computer that runs the development server. On Linux the command is ifconfig (that’s not a typo. It’s not ipconfig). My computer’s IP address is 126.96.36.199
- Start the development server as follows: python manage.py runserver 0.0.0.0:8800
- Start a browser on your phone
- Goto: http://<the server IP address>:8800 In my case that would be http://192.168.1.64:8800
You should see your website on your phone now.
Is wi-fi on on your phone?