| 1 |
<style> |
| 2 |
.promo li a { |
| 3 |
float: left; |
| 4 |
width: 130px; |
| 5 |
height: 20px; |
| 6 |
text-align: center; |
| 7 |
margin: 10px 30px; |
| 8 |
padding: 150px 0 0 0; |
| 9 |
background-position: 0 50%; |
| 10 |
background-size: 130px auto; |
| 11 |
background-repeat: no-repeat; |
| 12 |
font-size: 120%; |
| 13 |
color: black; |
| 14 |
} |
| 15 |
.promo li { |
| 16 |
list-style: none; |
| 17 |
} |
| 18 |
</style> |
| 19 |
|
| 20 |
# Django REST framework 3.16 |
| 21 |
|
| 22 |
At the Internet, on March 28th, 2025, we are happy to announce the release of Django REST framework 3.16. |
| 23 |
|
| 24 |
## Updated Django and Python support |
| 25 |
|
| 26 |
The latest release now fully supports Django 5.1 and the upcoming 5.2 LTS as well as Python 3.13. |
| 27 |
|
| 28 |
The current minimum versions of Django is now 4.2 and Python 3.9. |
| 29 |
|
| 30 |
## Django LoginRequiredMiddleware |
| 31 |
|
| 32 |
The new `LoginRequiredMiddleware` introduced by Django 5.1 can now be used alongside Django REST Framework, however it is not honored for API views as an equivalent behavior can be configured via `DEFAULT_AUTHENTICATION_CLASSES`. See [our dedicated section](../api-guide/authentication.md#django-51-loginrequiredmiddleware) in the docs for more information. |
| 33 |
|
| 34 |
## Improved support for UniqueConstraint |
| 35 |
|
| 36 |
The generation of validators for [UniqueConstraint](https://docs.djangoproject.com/en/stable/ref/models/constraints/#uniqueconstraint) has been improved to support better nullable fields and constraints with conditions. |
| 37 |
|
| 38 |
## Other fixes and improvements |
| 39 |
|
| 40 |
There are a number of fixes and minor improvements in this release, ranging from documentation, internal infrastructure (typing, testing, requirements, deprecation, etc.), security and overall behavior. |
| 41 |
|
| 42 |
See the [release notes](release-notes.md) page for a complete listing. |