pepr
pepr

Reputation: 20762

TurnKey Django -- how to upgrade Django to 1.4

I cannot find a good source of information on how to upgrade Django to 1.4 on TurnKey Django (based on Ubuntu 10.04). I did not worked at Unix machine for a long time and I am a bit lost. Some IRC channel?

Upvotes: 1

Views: 3045

Answers (2)

Burhan Khalid
Burhan Khalid

Reputation: 174624

The best way to do this is to install django 1.4 in a virtual environment.

First, install virtualenv (if its not installed already sudo apt-get install python-virtualenv)

Then, install django 1.4:

$ virtualenv --no-site-packages django_1_4
$ source django_1_4/bin/activate
(django_1_4) $ pip install django
(django_1_4) $ python
Python 2.7.3 (default, Apr 20 2012, 22:44:07) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.get_version()
'1.4'

After your comment, I have another suggestion. Since this is a single purpose machine, you can simply upgrade the global version of django on your machine.

First, to avoid conflicts, uninstall django if it was installed from apt:

apt-get remove --purge python-django

Then, since you already installed python-virtualenv from above, you can do this:

$ sudo pip install -U django

This will upgrade (or install) django to the latest version available to the global site packages directory.

Then you can do the same import django and then django.get_version() and it should return 1.4.

Upvotes: 2

Paragon
Paragon

Reputation: 2722

While I am having a hard time finding an official source with version information, it seems to me that the latest Django release for TurnKey Linux is (as of Dec. 2011) at most version 1.3.1.

Check out this mail archive question and click through the threads for more information. They discuss setting up the latest version of Django for TurnKey Linux using tools such as virtualenv to ensure that you are able to continue to use older (outdated) packages if need be.

Upvotes: 1

Related Questions