Problem: I want to see how my Django website looks
in a Parallels VM with Internet Explorer 7, 8, or some other Windows
version of a browser, but using an already-running Django
development server running on my Mac to do so.

Solution:

  1. Shutdown your current Django development server.
  2. At the terminal type: ifconfig
  3. In the terminal output look for “en1:” > “inet”,
    and copy the IP address next to inet.
  4. Open your settings.py or settings_local.py, and assign
    the IP you copied to SITE_URL.
  5. Instead of the usual “runserver 127.0.0.1:8000″, replace
    the 127.0.0.1 with IP you copied above (your computer’s IP).
  6. Use the IP address you copied in your Parallel’s VM to see the
    Django site running on your development server.

Hope this helped other folks perform cross-platform IE browser-testing.
This article is
based on runserver information in the Django docs:

“Note that the default IP address, 127.0.0.1, is not accessible from
other machines on your network. To make your development server
viewable to other machines on the network, use its own IP address
(e.g. 192.168.2.1) or 0.0.0.0.”

Note: I couldn’t get the 0.0.0.0 version of this to work, but
any tips, suggestions, solutions, or otherwise are greatly appreciated.

Tested with:

  • Mac OS 10.6.4 Snow Leopard
  • Django 1.2.3
  • Python 2.6.5
  • Parallels 6, Windows Vista, Internet Explorer 7
About these ads