Sunday, August 05, 2012

How To Check Your Django Version In Ubuntu

If you have been working with Django for sometime, you will have noticed how fast the framework development has been going. So, once in a while you need to check that you are not using a very old version.

It is quite easy to upgrade, but believe me, some people never bother at all. There are different reason for not upgrading, - either you have some production code that rely on specific packages in that version - and upgrading means that you will need to rewrite all those code, or you are simply just too lazy to do it.

But if however, you want to know what version is running on your server, simply running this command should do the trick.

helen@helen-server:~$ 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()

As you can see from the output above, our current version is 1.4, which at the time of this blog post was the latest version.

If you see that your version is a bit older, then simply upgrade by using this command.
This is best simply because it is short and easy to remember for beginners out there.
% sudo apt-get upgrade django

Enter your root password and the upgrade will commence.

On a different note though:

This is for starters - but if you are interested, then see the Free GitHub Tutorial Videos here. But please mind the photos of the naked ladies :) You might also want to check oDesk as for freelancing opportunity if you have free time and would like to earn yourself some income in the process.

You may want to make some cool cash right now as a developer on oDesk simply by helping people with the programming problems. If Java is not your thing, then check out Python or any other programming languages.

No comments:

Related Posts with Thumbnails