My basic workflow is to use Vagrant and Ansible to configure a local virtual machine, then use Ansible to configure the production server. The goal is to have the local and production servers be nearly identical.
The both machines serve Django using nginx and gunicorn. I use a Vagrant synced folder to allow me to edit the code during development. I have an terminal with an SSH connection to the Vagrant machine that I use to restart the server when the code changes. This works, but the edit/run cycle is slow compared to the good old days of using the Django development server. How can I get back to using the development server?
One option would be to go back to the old days and install a local virtualenv and database. This seems clumsy to me. The better option is to open an IP address on my local virtual machine and then run Django development machine on that port on the VM. Here are the steps.
1) SSH into the local server and start the virtualenv.
2) Stop nginx:
service nginx stop
3) Run the Django development server on the Vagrant IP address:
python manage.py runserver 192.168.33.16:8000 --settings=myapp.settings.local