← Back to team overview

canonical-django team mailing list archive

manage.py runserver on a remote machine

 

So I often do the runserver+sqlite thing on my laptop to test, but
often I'm doing development on a remote server because my app needs
access to resources on that machine.  I added this to ~/.ssh/config to
make it easier to play with runserver on remote servers:

	Host gubbins.example.com piffle.example.com
	    LocalForward 8000 localhost:8000

So I ssh to gubbins, make a change, then runserver.  The localhost url
it spits out Just Works, and I can right click on it in gnome-terminal
and launch it immediately in a firefox tab.

The only caveat is that if in the above example I logged into *both*
gubbins and piffle, there's a race to see who grabs localhost:8000.

-- 
Nick Moffitt