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/api-guide/fields.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,9 @@ Defaults to `False`
49
49
50
50
### `default`
51
51
52
-
If set, this gives the default value that will be used for the field if no input value is supplied. If not set the default behavior is to not populate the attribute at all.
52
+
If set, this gives the default value that will be used for the field if no input value is supplied. If not set the default behaviour is to not populate the attribute at all.
53
+
54
+
The `default` is not applied during partial update operations. In the partial update case only fields that are provided in the incoming data will have a validated value returned.
53
55
54
56
May be set to a function or other callable, in which case the value will be evaluated each time it is used. When called, it will receive no arguments. If the callable has a `set_context` method, that will be called each time before getting the value with the field instance as only argument. This works the same way as for [validators](validators.md#using-set_context).
55
57
@@ -486,7 +488,7 @@ This field is used by default with `ModelSerializer` when including field names
486
488
487
489
**Signature**: `ReadOnlyField()`
488
490
489
-
For example, is`has_expired` was a property on the `Account` model, then the following serializer would automatically generate it as a `ReadOnlyField`:
491
+
For example, if`has_expired` was a property on the `Account` model, then the following serializer would automatically generate it as a `ReadOnlyField`:
490
492
491
493
class AccountSerializer(serializers.ModelSerializer):
Copy file name to clipboardExpand all lines: docs/api-guide/filtering.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -241,7 +241,6 @@ For more details on using filter sets see the [django-filter documentation][djan
241
241
* By default filtering is not enabled. If you want to use `DjangoFilterBackend` remember to make sure it is installed by using the `'DEFAULT_FILTER_BACKENDS'` setting.
242
242
* When using boolean fields, you should use the values `True` and `False` in the URL query parameters, rather than `0`, `1`, `true` or `false`. (The allowed boolean values are currently hardwired in Django's [NullBooleanSelect implementation][nullbooleanselect].)
243
243
*`django-filter` supports filtering across relationships, using Django's double-underscore syntax.
244
-
* For Django 1.3 support, make sure to install `django-filter` version 0.5.4, as later versions drop support for 1.3.
Copy file name to clipboardExpand all lines: docs/api-guide/permissions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,7 @@ This permission is suitable if you want to your API to allow read permissions to
132
132
133
133
## DjangoModelPermissions
134
134
135
-
This permission class ties into Django's standard `django.contrib.auth`[model permissions][contribauth]. This permission must only be applied to views that has a `.queryset` property set. Authorization will only be granted if the user *is authenticated* and has the *relevant model permissions* assigned.
135
+
This permission class ties into Django's standard `django.contrib.auth`[model permissions][contribauth]. This permission must only be applied to views that have a `.queryset` property set. Authorization will only be granted if the user *is authenticated* and has the *relevant model permissions* assigned.
136
136
137
137
*`POST` requests require the user to have the `add` permission on the model.
138
138
*`PUT` and `PATCH` requests require the user to have the `change` permission on the model.
Copy file name to clipboardExpand all lines: docs/api-guide/versioning.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,8 +71,8 @@ You can also set the versioning scheme on an individual view. Typically you won'
71
71
The following settings keys are also used to control versioning:
72
72
73
73
*`DEFAULT_VERSION`. The value that should be used for `request.version` when no versioning information is present. Defaults to `None`.
74
-
*`ALLOWED_VERSIONS`. If set, this value will restrict the set of versions that may be returned by the versioning scheme, and will raise an error if the provided version if not in this set. Note that the value used for the `DEFAULT_VERSION` setting is always considered to be part of the `ALLOWED_VERSIONS` set. Defaults to `None`.
75
-
*`VERSION_PARAM`. The string that should used for any versioning parameters, such as in the media type or URL query parameters. Defaults to `'version'`.
74
+
*`ALLOWED_VERSIONS`. If set, this value will restrict the set of versions that may be returned by the versioning scheme, and will raise an error if the provided version is not in this set. Note that the value used for the `DEFAULT_VERSION` setting is always considered to be part of the `ALLOWED_VERSIONS` set (unless it is `None`). Defaults to `None`.
75
+
*`VERSION_PARAM`. The string that should be used for any versioning parameters, such as in the media type or URL query parameters. Defaults to `'version'`.
76
76
77
77
You can also set your versioning class plus those three values on a per-view or a per-viewset basis by defining your own versioning scheme and using the `default_version`, `allowed_versions` and `version_param` class variables. For example, if you want to use `URLPathVersioning`:
* Resolve form display with ChoiceField, MultipleChoiceField and non-string choices. ([#4374][gh4374], [#4119][gh4119], [#4121][gh4121], [#4137][gh4137], [#4120][gh4120])
60
+
* Fix call to TemplateHTMLRenderer.resolve_context() fallback method. ([#4371][gh4371])
61
+
62
+
### 3.4.3
63
+
64
+
**Date**: [5th August 2016][3.4.3-milestone]
65
+
66
+
* Include fallaback for users of older TemplateHTMLRenderer internal API. ([#4361][gh4361])
67
+
68
+
### 3.4.2
69
+
70
+
**Date**: [5th August 2016][3.4.2-milestone]
71
+
72
+
* Include kwargs passed to 'as_view' when generating schemas. ([#4359][gh4359], [#4330][gh4330], [#4331][gh4331])
73
+
* Access `request.user.is_authenticated` as property not method, under Django 1.10+ ([#4358][gh4358], [#4354][gh4354])
74
+
* Filter HEAD out from schemas. ([#4357][gh4357])
75
+
* extra_kwargs takes precedence over uniqueness kwargs. ([#4198][gh4198], [#4199][gh4199], [#4349][gh4349])
76
+
* Correct descriptions when tabs are used in code indentation. ([#4345][gh4345], [#4347][gh4347])*
77
+
* Change template context generation in TemplateHTMLRenderer. ([#4236][gh4236])
78
+
* Serializer defaults should not be included in partial updates. ([#4346][gh4346], [#3565][gh3565])
79
+
* Consistent behavior & descriptive error from FileUploadParser when filename not included. ([#4340][gh4340], [#3610][gh3610], [#4292][gh4292], [#4296][gh4296])
0 commit comments