| 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.14 |
| 21 |
|
| 22 |
## Django 4.1 support |
| 23 |
|
| 24 |
The latest release now fully supports Django 4.1, and drops support for Django 2.2. |
| 25 |
|
| 26 |
Our requirements are now: |
| 27 |
|
| 28 |
* Python 3.6+ |
| 29 |
* Django 4.1, 4.0, 3.2, 3.1, 3.0 |
| 30 |
|
| 31 |
## `raise_exception` argument for `is_valid` is now keyword-only. |
| 32 |
|
| 33 |
Calling `serializer_instance.is_valid(True)` is no longer acceptable syntax. |
| 34 |
If you'd like to use the `raise_exception` argument, you must use it as a |
| 35 |
keyword argument. |
| 36 |
|
| 37 |
See Pull Request [#7952](https://github.com/encode/django-rest-framework/pull/7952) for more details. |
| 38 |
|
| 39 |
## `ManyRelatedField` supports returning the default when the source attribute doesn't exist. |
| 40 |
|
| 41 |
Previously, if you used a serializer field with `many=True` with a dot notated source field |
| 42 |
that didn't exist, it would raise an `AttributeError`. Now it will return the default or be |
| 43 |
skipped depending on the other arguments. |
| 44 |
|
| 45 |
See Pull Request [#7574](https://github.com/encode/django-rest-framework/pull/7574) for more details. |
| 46 |
|
| 47 |
|
| 48 |
## Make Open API `get_reference` public. |
| 49 |
|
| 50 |
Returns a reference to the serializer component. This may be useful if you override `get_schema()`. |
| 51 |
|
| 52 |
## Change semantic of OR of two permission classes. |
| 53 |
|
| 54 |
When OR-ing two permissions, the request has to pass either class's `has_permission() and has_object_permission()`. |
| 55 |
|
| 56 |
Previously, both class's `has_permission()` was ignored when OR-ing two permissions together. |
| 57 |
|
| 58 |
See Pull Request [#7522](https://github.com/encode/django-rest-framework/pull/7522) for more details. |
| 59 |
|
| 60 |
## Minor fixes and improvements |
| 61 |
|
| 62 |
There are a number of minor fixes and improvements in this release. See the [release notes](release-notes.md) page for a complete listing. |
| 63 |
|
| 64 |
--- |
| 65 |
|
| 66 |
## Deprecations |
| 67 |
|
| 68 |
### `serializers.NullBooleanField` |
| 69 |
|
| 70 |
`serializers.NullBooleanField` was moved to pending deprecation in 3.12, and deprecated in 3.13. It has now been removed from the core framework. |
| 71 |
|
| 72 |
Instead use `serializers.BooleanField` field and set `allow_null=True` which does the same thing. |