Upgrade Django

Django 4.2.x

Supported until 2026-04-01

Release Highlights

  • Django 4.2.x is a LTS release and will be supported until April 2026
  • Psycopg 3 is now supported
  • Ability to add comments to Django ORM tables and fields

Upgrade Gotchas

  • Dropped support for MariaDB 10.3
  • Dropped support for MySQL 5.7
  • Dropped support for PostgreSQL 11
  • index_together Meta option is deprecated in favor of indexes

CSRF_TRUSTED_ORIGINS

This now needs to be set if you are proxying to your WSGI process, which is 99% of the time.

The easiest thing to do is to duplicate your ALLOWED_HOSTS setting in settings.py with something like:

CSRF_TRUSTED_ORIGINS = [f"https://{host}" for host in ALLOWED_HOSTS]
  • Python 3.8
  • Python 3.9
  • Python 3.10
  • Python 3.11
  • Python 3.12

Released Versions

Version Release Date Release Type Blog Post Release Notes GitHub
4.2.23 2025-06-10
BUGFIX
Blog Post Release Notes GitHub
4.2.22 2025-06-04
SECURITY
Blog Post Release Notes GitHub
4.2.21 2025-05-07
SECURITY
Blog Post Release Notes GitHub
4.2.20 2025-03-06
SECURITY
Blog Post Release Notes GitHub
4.2.19 2025-02-05
SECURITY
Blog Post Release Notes GitHub
4.2.18 2025-01-14
SECURITY
Blog Post Release Notes GitHub
4.2.17 2024-12-04
SECURITY
Blog Post Release Notes GitHub
4.2.16 2024-09-03
SECURITY
Blog Post Release Notes GitHub
4.2.15 2024-08-06
SECURITY
Blog Post Release Notes GitHub
4.2.14 2024-07-09
SECURITY
Blog Post Release Notes GitHub
4.2.13 2024-05-07
BUGFIX
Blog Post Release Notes GitHub
4.2.12 2024-05-06
BUGFIX
Blog Post Release Notes GitHub
4.2.11 2024-03-04
SECURITY
Blog Post Release Notes GitHub
4.2.10 2024-02-06
SECURITY
Blog Post Release Notes GitHub
4.2.9 2024-01-02
BUGFIX
Blog Post Release Notes GitHub
4.2.8 2023-12-04
BUGFIX
Blog Post Release Notes GitHub
4.2.7 2023-11-01
SECURITY
Blog Post Release Notes GitHub
4.2.6 2023-10-04
SECURITY
Blog Post Release Notes GitHub
4.2.5 2023-09-04
SECURITY
Blog Post Release Notes GitHub
4.2.4 2023-08-01
SECURITY
Blog Post Release Notes GitHub
4.2.3 2023-06-03
SECURITY
Blog Post Release Notes GitHub
4.2.2 2023-06-05
BUGFIX
Blog Post Release Notes GitHub
4.2.1 2023-05-03
SECURITY
Blog Post Release Notes GitHub
4.2 2023-04-03
RELEASE
Blog Post Release Notes GitHub
4.2rc1 2023-03-20
RC
Blog Post Release Notes GitHub
4.2b1 2023-02-20
BETA
Blog Post Release Notes GitHub
4.2a1 2023-01-17
ALPHA
Blog Post Release Notes GitHub

Need help upgrading Django? REVSYS can make it easy for your team.