Django: How to check the Django version you're using right now

Published on Aug. 22, 2023, 12:12 p.m.

You might be wondering () what is the version of Django you are using right now.

Method 1

python -m django --version

Method 2

django-admin --version

Method 3

The third method is known to almost all of us, but we might not have paid much attention () to it.

python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
February 22, 2022 - 20:32:37
Django version 4.0.2, using settings 'myproject.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
E:\codespeedy\codespeedy_final\myproject\myapiapp\views.py changed, reloading.
Watching for file changes with StatReloader
Performing system checks...

Method 3

You can also check the pip version using pip.

pip freeze

The output somewhat () looks .

Django==3.2.9
djangorestframework==3.13.1

Method 4

django.get_version()

Method 5

The slight change in syntax is that after importingdjango , we need to writedjango.VERSION , but the output varies .

django.VERSION
(3, 2, 9, 'final', 0)