HiveBrain v1.2.0
Get Started
← Back to all entries
snippetpythondjangoCritical

How to check Django version

Submitted by: @import:stackoverflow-api··
0
Viewed 0 times
checkhowdjangoversion

Problem

I have to use Python and Django for our application. So, I have two versions of Python, 2.6 and 2.7. Now I have installed Django. I could run the sample application for testing Django successfully. But how do I check whether Django uses the 2.6 or 2.7 version and what version of modules Django uses?

Solution

Django 1.5 supports Python 2.6.5 and later.

If you're under Linux and want to check the Python version you're using, run python -V from the command line.

If you want to check the Django version, open a Python console and type

>>> import django
>>> django.VERSION
(2, 0, 0, 'final', 0)

Code Snippets

>>> import django
>>> django.VERSION
(2, 0, 0, 'final', 0)

Context

Stack Overflow Q#6468397, score: 817

Revisions (0)

No revisions yet.