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
Copy file name to clipboardExpand all lines: docs/topics/3.8-announcement.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,28 @@ If you use REST framework commercially and would like to see this work continue,
33
33
34
34
*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).*
35
35
36
+
37
+
---
38
+
39
+
##Breaking Changes
40
+
41
+
###Altered behaviour of`read_only` plus`default` on Field.
42
+
43
+
[#5886][gh5886]
44
+
45
+
`read_only` fields will now**always** be excluded from writable fields.
46
+
47
+
Previously`read_only` fields with a`default` value would use the`default` for create and update operations.
48
+
49
+
In order to maintain the old behaviour you may need to pass the value of`read_only` fields when calling`save()` in
50
+
the view:
51
+
52
+
def perform_create(self, serializer):
53
+
serializer.save(owner=self.request.user)
54
+
55
+
Alternatively you may override`save()` or`create()` or`update()` on the serialiser as appropriate.