You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 3.8 release is a maintenance focused release resolving a large number of previously outstanding issues and laying
23
+
the foundations for future changes.
24
+
25
+
---
26
+
27
+
## Funding
28
+
29
+
If you use REST framework commercially and would like to see this work continue, we strongly encourage you to invest in its continued development by
30
+
**[signing up for a paid plan][funding]**.
31
+
32
+
33
+
*We'd like to say thanks in particular our premium backers, [Rover](http://jobs.rover.com/), [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [Machinalis](https://hello.machinalis.co.uk/), and [Rollbar](https://rollbar.com).*
34
+
35
+
---
36
+
37
+
## Breaking Changes
38
+
39
+
### Altered the behaviour of `read_only` plus `default` on Field.
40
+
41
+
[#5886][gh5886]`read_only` fields will now **always** be excluded from writable fields.
42
+
43
+
Previously `read_only` fields when combined with a `default` value would use the `default` for create and update
44
+
operations. This was counter-intuitive in some circumstances and led to difficulties supporting dotted `source`
45
+
attributes on nullable relations.
46
+
47
+
In order to maintain the old behaviour you may need to pass the value of `read_only` fields when calling `save()` in
48
+
the view:
49
+
50
+
def perform_create(self, serializer):
51
+
serializer.save(owner=self.request.user)
52
+
53
+
Alternatively you may override `save()` or `create()` or `update()` on the serialiser as appropriate.
54
+
55
+
---
56
+
57
+
## Deprecations
58
+
59
+
### `action` decorator replaces `list_route` and `detail_route`
60
+
61
+
[#5705][gh5705]`list_route` and `detail_route` have been merge into a single `action` decorator. This improves viewset action introspection, and will allow extra actions to be displayed in the Browsable API in future versions.
62
+
63
+
Both `list_route` and `detail_route` are now pending deprecation. They will be deprecated in 3.9 and removed entirely
64
+
in 3.10.
65
+
66
+
The new `action` decorator takes a boolean `detail` argument.
67
+
68
+
* Replace `detail_route` uses with `@action(detail=True)`.
69
+
* Replace `list_route` uses with `@action(detail=False)`.
70
+
71
+
72
+
### `exclude_from_schema`
73
+
74
+
Both `APIView.exclude_from_schema` and the `exclude_from_schema` argument to the `@api_view` decorator are now deprecated. They will be removed entirely in 3.9.
75
+
76
+
For `APIView` you should instead set a `schema = None` attribute on the view class.
77
+
78
+
For function based views the `@schema` decorator can be used to exclude the view from the schema, by using `@schema(None)`.
79
+
80
+
---
81
+
82
+
## Minor fixes and improvements
83
+
84
+
There are a large number of minor fixes and improvements in this release. See the [release notes](release-notes.md) page
85
+
for a complete listing.
86
+
87
+
88
+
## What's next
89
+
90
+
We're currently working towards moving to using [OpenAPI][openapi] as our default schema output. We'll also be revisiting our API documentation generation and client libraries.
91
+
92
+
We're doing some consolidation in order to make this happen. It's planned that 3.9 will drop the `coreapi` and `coreschema` libraries, and instead use `apistar` for the API documentation generation, schema generation, and API client libraries.
0 commit comments