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 testi
There are various ways to get the Django version. You can use any one of the following given below according to your requirements.
Note: If you are working in a virtual environment then please load your python environment
python -m django --versiondjango-admin --version or django-admin.py version./manage.py --version or python manage.py --versionpip freeze | grep Djangopython -c "import django; print(django.get_version())"python manage.py runserver --versionimport django
django.get_version() OR
django.VERSIONfrom django.utils import version
version.get_version() OR version.get_complete_version()import pkg_resources
pkg_resources.get_distribution('django').version(Feel free to modify this answer, if you have some kind of correction or you want to add more related information.)