diff options
| author | Tom Christie | 2014-10-10 14:16:09 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-10-10 14:16:09 +0100 |
| commit | d9a199ca0ddf92f999aa37b396596d0e3e0a26d9 (patch) | |
| tree | c7521c3c046e5f97e52bab51aef8a5367ad52f6e /docs | |
| parent | a0e852a4d52558db93209b4616f030b4ae2dcedb (diff) | |
| download | django-rest-framework-d9a199ca0ddf92f999aa37b396596d0e3e0a26d9.tar.bz2 | |
exceptions.ValidationFailed, not Django's ValidationError
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/3.0-announcement.md | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/docs/topics/3.0-announcement.md b/docs/topics/3.0-announcement.md index bffc608a..b28670cf 100644 --- a/docs/topics/3.0-announcement.md +++ b/docs/topics/3.0-announcement.md @@ -191,7 +191,7 @@ Using the `depth` option on `ModelSerializer` will now create **read-only nested def create(self, validated_data): profile_data = validated_data.pop['profile'] user = User.objects.create(**validated_data) - profile = Profile.objects.create(user=user, **profile_data) + Profile.objects.create(user=user, **profile_data) return user The single-step object creation makes this far simpler and more obvious than the previous `.restore_object()` behavior. @@ -223,10 +223,6 @@ We can now inspect the serializer representation in the Django shell, using `pyt rating = IntegerField() created_by = PrimaryKeyRelatedField(queryset=User.objects.all()) -#### Always use `fields`, not `exclude`. - -The `exclude` option on `ModelSerializer` is no longer available. You should use the more explicit `fields` option instead. - #### The `extra_kwargs` option. The `write_only_fields` option on `ModelSerializer` has been moved to `PendingDeprecation` and replaced with a more generic `extra_kwargs`. |
