I decided to upgrade my Django site finally, making a jump from 1.6 to 1.11
Simply using the pip method didn’t work because it throws an error about the old version of Django being owned by OS and no supplication to the sudo gods will change its mind about that.
Fine, I thought, I should be using virtualenv anyway. I’ll just figure that out. So I create a virtualenv at /home/django/ahe/ahe and install django 1.11
I have a gunicorn daemon running via an upstart script so I also install gunicorn in the virtualenv. I alter the gunicorn.conf so that it calls this new gunicorn. I kill the old processes. New ones pop up immediately, but when I point my browser to my homepage the result is still running Django 1.6
I’ve tried to keep this simple, but I’ve actually spent hours trying different ways of solving this and I am at a loss. Any help is appreciated. Here’s my gunicorn.conf:
start on (local-filesystems and net-device-up IFACE=eth0) stop on runlevel [!12345] # If the process quits unexpectadly trigger a respawn respawn setuid django setgid django chdir /home/django script exec 2>>/tmp/upstartconfig.log set -x # Run gunicorn from the virtualenv cd /home/django/ahe/ahe source bin/activate exec /home/django/ahe/ahe/bin/gunicorn \ --name=django_project \ --pythonpath=django_project \ --bind=127.0.0.1:9000 \ --config /etc/gunicorn.d/gunicorn.py \ django_project.wsgi:application end script
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!