Forums

Upgrade to django 1.7

I have a project on python 3.3 that was running django 1.6.5. I've upgraded on local to django 1.7 successfully, but am having issues on PA. I installed django 1.7 successfully through pip3, and the pip3 freeze shows that django 1.7 is installed. However, my app is still running 1.6.5 according to the manage.py django.VERSION.

Am I missing something that I need to do to upgrade to django 1.7?

I've restarted my bash console, my web app, checked my wsgi file, even upgraded python 2.7 to django 1.7 through pip. Not sure what else to change or where else to look?

Are you sure your virtualenv is activated when you run manage.py?

I'm actually not using a virtualenv on PA. It's something I set up a while ago before I understood virtualenvs. In my local environment the virtualenv is activated.

That's the problem, then. You'll need to use a virtualenv if you want to use a different version of Django to the one that's already installed: Docs here

ok thanks I'll set up an virtualenv and give it a shot, although that doesn't quite make sense to me. That is saying that you can't change any packages in the user account, which is not true.

Django 1.6 was uninstalled for my user and django 1.7 was installed the same way that any other package is installed. Doesn't that mean I changed django to be 1.7 in my global user account?

I'm inside my activated virtualenv and installed django 1.7 successfully. manage.py is still referring to django 1.6. I really think there's something underlying. It should be working when installed to my --user account, like all the other installed packages to my user account.

(one small note on the docs, For python3 I had to type mkvirtualenv --python=/usr/bin/python3 env_name instead of mkvirtualenv --python=python3 env_name as suggested in the doc. The python3 command worked normally so it was indeed mapped correctly before running this command.)

I was able to get this running on django 1.7 by recreating the entire project in a virtualenv. Still confused why django was not able to update to 1.7 for my entire user, oh well.

Hmm. When you ran manage.py, are you sure it was using the right Python version? Perhaps it was using 3.4 when you were expecting it to use 3.3, or something like that.