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
Remove a few no longer needed compat checks and references (#7092)
* serializers: removes no longer needed compat checks
UUIDField and DurationField are both supported in all supported Django
versions.
IPAddressField was removed in Django 1.9, which is no longer supported.
* serializers: move related code closer together
This way it's easier to see all of the mappings in one place.
* serializers,docs: remove some DRF 2.x references
The last release of DRF 2.x was 5 years ago, it seems fine to remove
these references now.
Copy file name to clipboardExpand all lines: docs/api-guide/fields.md
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -597,8 +597,6 @@ The `.to_representation()` method is called to convert the initial datatype into
597
597
598
598
The `to_internal_value()` method is called to restore a primitive datatype into its internal python representation. This method should raise a `serializers.ValidationError` if the data is invalid.
599
599
600
-
Note that the `WritableField` class that was present in version 2.x no longer exists. You should subclass `Field` and override `to_internal_value()` if the field supports data input.
Copy file name to clipboardExpand all lines: docs/api-guide/generic-views.md
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -175,8 +175,6 @@ You can also use these hooks to provide additional validation, by raising a `Val
175
175
raise ValidationError('You have already signed up')
176
176
serializer.save(user=self.request.user)
177
177
178
-
**Note**: These methods replace the old-style version 2.x `pre_save`, `post_save`, `pre_delete` and `post_delete` methods, which are no longer available.
179
-
180
178
**Other methods**:
181
179
182
180
You won't typically need to override the following methods, although you might need to call into them if you're writing custom views using `GenericAPIView`.
0 commit comments