The high-level Python web framework Django is well known for its adaptability and simplicity of use. Maintaining your projects up to date and compatible with the newest features and security patches requires knowing how to check Django version, regardless of experience level in web development.
Django Versions All Proper Lists
Version | Release Date | End of Mainstream Support | End of Security Support |
4.2 LTS | December 8, 2022 | December 2023 | December 2025 |
4.1 | September 20, 2022 | April 5, 2023 | April 7, 2025 |
3.2 LTS | December 7, 2021 | December 2022 | December 2024 |
3.1 | September 14, 2021 | April 5, 2022 | April 7, 2024 |
3.0 | December 10, 2020 | December 2021 | December 2023 |
2.2 | September 12, 2019 | December 2020 | December 2022 |
2.1 | March 14, 2018 | December 2019 | December 2021 |
2.0 | July 13, 2017 | December 2018 | December 2020 |
1.11 | June 29, 2016 | December 2017 | December 2019 |
1.10 | January 15, 2015 | December 2016 | December 2018 |
1.9 | October 13, 2014 | December 2015 | December 2017 |
1.8 | June 1, 2014 | December 2015 | December 2017 |
1.7 | March 8, 2013 | December 2014 | December 2016 |
1.6 | December 6, 2012 | December 2013 | December 2015 |
1.5 | July 10, 2012 | December 2013 | December 2015 |
1.4 | March 8, 2012 | December 2012 | December 2014 |
1.3 | November 21, 2011 | December 2012 | December 2014 |
1.2 | August 10, 2011 | December 2011 | December 2013 |
1.1 | April 19, 2011 | December 2011 | December 2013 |
1.0 | July 20, 2005 | December 2005 | December 2007 |
How to check Django Version? Process
Using the python -m django –version command: To verify the Django version, the easiest method is to enter this command into your terminal or command prompt (cmd).
Input:
python -m django –version
output:
Django version 3.2.9
Using the Django-admin –version command: Using the Django-admin command is another simple way to find the version of Django. Launch the command prompt or terminal and type in –
Input:
Django-admin –version
output:
3.2.9
Using the pip freeze | grep Django command: Use the pip freeze and grep commands together to see a list of all installed Python modules and filter for the Django module. Just type the following command into the command prompt or terminal:
Input:
pip freeze | grep Django
output:
django==3.2.9
Using the python manage.py run server –version command: Use the following command to verify the Django version if you’d rather while the development server is up and running:
Input:
python manage.py runserver –version
Output:
3.2.9
Check the Django Version using IDLE: Open Python IDLE to verify the Django version for Python 3. Write the identical line in the IDLE provided below.
import django
django.get_version()
import Django
Django.VERSION
Check the Django Version using the pip: It provides all of the Python modules that are currently installed on your system. Launch a terminal window and enter the pip command there.
pip freeze or pip list
Update Django Version for Python
Any of these commands can be used to update the version of Django that you are using.
python -m pip install –upgrade Django
python -m pip install -U Django
# Python 3.8 to 3.11 supported only
python -m pip install Django-upgrade
Upgrade or Downgrade your Django version for Python
You can use the command below to upgrade or downgrade your Django version by entering its version number. This is useful if you occasionally want a specific version of Django to function properly in your environment.
pip install -v Django==3.0.5
Conclusion
staying updated with Django versions is crucial for web projects’ security and functionality. Utilizing commands like ‘python -m django –version,’ ‘Django-admin –version,’ ‘pip freeze | grep Django,’ and ‘python manage.py run server –version’ enables easy version checks, ensuring projects align with the latest features and security patches, regardless of one’s expertise level.