How to check your Django version

There are multiple ways to check what Django version you are on. Some are easier than others. I will go over 4 options, if they all don’t work for you, comment below and I will try to help you out.

Option 1

When you start your server (python runserver), you will get some output right away. That will also tell you on what version you are. Look at the sample data below.

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
November 20, 2019 - 14:34:16
Django version 2.2.5, using settings 'back.settings'
Starting ASGI/Channels version 2.3.0 development server at
Quit the server with CONTROL-C.

There it says: Django version 2.2.5, using settings 'back.settings', so your Django version is 2.2.5.

Option 2

Stop the server and then run pip freeze | grep Django (when you are in the virtual environment). The output should be something like this:


Django is shown there as Django==2.2.5, which means that Django is currently on version 2.2.5.

Option 3

Stop the server (if you haven’t already) and open up shell python shell and then enter this:

import django

For me, it prints out 2.2.5, which then is your Django version.

Option 4

Stop the server (if you haven’t already) and then run this:

python version

Which prints 2.2.5 for me.

Change the Django version

If you want to upgrade Django, then you can run pip install --upgrade django. If you would like to downgrade, then you can run pip install django==<versionnumber>. Replace <versionnumber> with the actual number, like 2.2.1.

I hope this helps you out.

Django tips-tricks version
Written by Stan Triepels

Stan is professional web developer working mainly with Django and VueJS. With years of experience under the belt, he is comfortable writing about his past mistakes and ongoing learnings.