Django REST Framework 3.16
Released on March 28th, 2025
Updated Django and Python Support
The latest release now fully supports Django 5.1 and the upcoming 5.2 LTS as well as Python 3.13.Minimum Django Version
Django 4.2 LTS
Minimum Python Version
Python 3.9
Latest Django Support
Django 5.1, 5.2a1
Latest Python Support
Python 3.13
Django LoginRequiredMiddleware
The newLoginRequiredMiddleware introduced by Django 5.1 can now be used alongside Django REST Framework.
However, it is not honored for API views as equivalent behavior can be configured via
DEFAULT_AUTHENTICATION_CLASSES. See our dedicated authentication section in the docs for more information.Improved Support for UniqueConstraint
The generation of validators for UniqueConstraint has been improved to better support:Nullable Fields
Better handling of nullable fields in unique constraints
Conditional Constraints
Support for constraints with conditions
Example
If you have a model with a conditional unique constraint:Other Fixes and Improvements
There are a number of fixes and minor improvements in this release:Documentation Improvements
Documentation Improvements
- Updated links to use stable versions
- Expanded docs on unique constraints
- Added tutorial notes for HyperlinkedModelSerializer
- Fixed broken links and typos
Internal Infrastructure
Internal Infrastructure
- Updated GitHub Actions to Ubuntu 24.04
- Updated test matrix for Django 5.2
- Added
pyupgradeto pre-commit hooks - Improved typing and test coverage
Security & Bug Fixes
Security & Bug Fixes
- Fixed issues with AttributeError in properties
- Fixed template context handling
- Improved converter registration
Deprecation & Cleanup
Deprecation & Cleanup
- Removed Python 3.8 support
- Removed long deprecated code from request wrapper
- Removed deprecated AutoSchema methods
Complete Release Notes
See the release notes page for a complete listing of all changes in version 3.16.Upgrading
To upgrade to Django REST Framework 3.16:Contributors
This release includes contributions from many developers in the community:New Contributors:
- @araggohnxd, @mbeijen, @stefan6419846, @ren000thomas, @ulgens, @bukh-sal, @rezatn0934, @Rohit10jr, @kushibayev, @alihassancods, @kulikjak, @Natgho
Links
Full Changelog
View all changes on GitHub
PyPI Release
Download from PyPI
Documentation
Browse the documentation
Discussion Group
Join the community
