×

Django Tutorial

Django Examples

Django Practice

How to Check Django Version?

Learn about the steps to check the version of Python Django.
Submitted by Apurva Mathur, on May 17, 2022

Django is a high-level Python Web framework, which makes it easier to create web sites using Python.  A Web framework is a set of components that provide a standard way to develop websites fast and easily. It provides a set of tools and functionalities that solves many common problems associated with Web development, such as security features, database access, sessions and templates etc.

The latest official version of Django is 4.0.4.

Steps to check Django version

Follow the following steps to check the installed Django version on your machine:

Step 1: Open the Command line interpreter and go to the folder where your Django is installed using cd command or you can directly go to the Django file location and type cmd, this will directly open the command line interpreter with the specified path.

Django Version (1)

Step 2: Once you've successfully had the Django path on the cmd then type the python -m django -version command this will give the version of Django installed on your machine.

Django Version (2)

Step 3: Another way is to type django-admin version command on same Django path in the command line interpreter.

Django Version (3)

Step 4: Open your Pycharm (or any other compiler like VS code, here I am using Pycharm but the steps will be the same in every compiler), once you’ve opened your Pycharm, go on any previous Django project and then on Pychram terminal type python manage.py version command.

Django Version (4)

Here, medassist is my project name (you can open any Django project to check the version.)

Step 5: One of the ways is to open the python.exe file (you'll get the python.exe file where your Django is installed) and type –

import pkg_resources
pkg_resources.get_distribution('django').version

Note: Write this code one by one else it will show the error.

Django Version (5)

Step 6: Last but not the least, type pip show django command on command line interpreter where your Django file is present, this method give us the whole information about the Django like the version, author, author-email, location etc.

Django Version (6)


Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.