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 manage.py runserver), you will get some output right away. That will also tell you
on what version you are. Look at the sample data below.
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
Option 3 #
Stop the server (if you haven’t already) and open up shell
python manage.py shell and then enter this:
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:
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
I hope this helps you out.