Django 5.2.x
Supported until 2029-04-01
Django 5.2 brings a host of enhancements designed to improve developer productivity, bolster performance, and enhance customization. Notably, it introduces several major new features that streamline workflows, modernize the frameworkâs architecture, and improve its support for asynchronous operations.
Release Highlights:
- Automatic models import in the shell: Models from all installed apps are auto-imported when running the shell, reducing setup time.
- Composite Primary Keys support: The new
CompositePrimaryKey
field enables models to use multiple fields as primary keys. - Simplified
BoundField
customization: Developers can now more easily override form rendering by setting a customBoundField
at project, form, or field level. - Expanded asynchronous support in authentication: A suite of new async methods and improved async backend implementations enhance performance and ease of use.
- New form widgets and accessibility improvements: Introduction of widgets like
ColorInput
,SearchInput
,TelInput
; along with new accessibility attributes for forms. - Improved QuerySet value ordering:
values()
andvalues_list()
now generate aSELECT
clause in the specified order. - Enhanced response and request handling: New properties and methods on
HttpResponse
andHttpRequest
add flexibility and clarity when handling HTTP data.
Upgrade Gotchas:
- Dropped support for PostgreSQL 13 and older versions of GDAL and PostGIS may require backend updates.
- Default MySQL connection character set changed to utf8mb4, which may affect legacy databases.
- Some minor backward-incompatible changes in areas such as error reporting and permission handling require attention.
Major Features:
- Automatic models import in the shell
- Composite Primary Keys with
models.CompositePrimaryKey
- Simplified customization of
BoundField
for forms - Expanded asynchronous methods in
django.contrib.auth
and auth backends - New form widgets (
ColorInput
,SearchInput
,TelInput
) and enhanced accessibility - Improved QuerySet and database function capabilities (e.g.,
JSONArray
,set_returning
)
-
Security patches
-
Bug fixes
-
Release
-
Alpha
-
Beta
Released Versions
Version | Release Date | Release Type | Blog Post | Release Notes | GitHub |
---|---|---|---|---|---|
5.2 | 2025-04-02 |
RELEASE
|
Blog Post | Release Notes | GitHub |
5.2b1 | 2025-02-19 |
BETA
|
Blog Post | Release Notes | GitHub |
5.2a1 | 2025-01-16 |
ALPHA
|
Blog Post | Release Notes | GitHub |