mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 19:43:59 +03:00
Merge pull request #2845 from Siecje/docs
Specifying module for CurrentUserDefault()
This commit is contained in:
commit
86e7702f11
|
@ -172,7 +172,7 @@ REST framework includes a couple of defaults that may be useful in this context.
|
||||||
A default class that can be used to represent the current user. In order to use this, the 'request' must have been provided as part of the context dictionary when instantiating the serializer.
|
A default class that can be used to represent the current user. In order to use this, the 'request' must have been provided as part of the context dictionary when instantiating the serializer.
|
||||||
|
|
||||||
owner = serializers.HiddenField(
|
owner = serializers.HiddenField(
|
||||||
default=CurrentUserDefault()
|
default=serializers.CurrentUserDefault()
|
||||||
)
|
)
|
||||||
|
|
||||||
#### CreateOnlyDefault
|
#### CreateOnlyDefault
|
||||||
|
|
Loading…
Reference in New Issue
Block a user