Problems with "runserver"
Hi,
I've followed succesfully the first lesson, but I just cannot make the django server work with the virtual machine.
When I try "python manage.py runserver 0.0.0.0:8000" I don't get any error but I still can't see the "it worked!" when opening in my browser 127.0.0.1:8888.
Besides fixing this, I would like to understand why this is happening. I tried uninstalling a previous version of django I had but still...
Thanks in advance!
Answers
Two things that come to mind:
- When you start the VM with
vagrant up, make sure you see a line (I know, there's a lot of output) about forwarding port 8000 to port 8888 - Before you do
python manage.py runserver, dowhich pythonand make sure the response is the path to your virtualenv.
FWIW: not a complete answer and I know this is not the recommended path, I set up ubuntu 12.04 VM directly on VBox and then created a second 'bridged' NIC since the app creates its own virtual network starting with 10.x.x.x. Setting the NIC to a static IP, in my case on the 192.x.x.x real network, I can access the django dev server using this address. HTH, V.
FWIW: not a complete answer and I know this is not the recommended path, I set up ubuntu 12.04 VM directly on VBox and then created a second 'bridged' NIC since the app creates its own virtual network starting with 10.x.x.x. Setting the NIC to a static IP, in my case on the 192.x.x.x real network, I can access the django dev server using this address. HTH, V.
Ok well it worked for me with this:
"chmod +x manage.py" "./manage.py runserver 0.0.0.0:8000"
Still don't understand why it didn't worked with "python manage.py runserver 0.0.0.0:8000".