Skip to content

Commit f7571e9

Browse files
committed
Added CurrentUserDefault.
1 parent 7268e19 commit f7571e9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

rest_framework-stubs/fields.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class CreateOnlyDefault(object):
3939
def set_context(self, serializer_field: Field) -> None: ...
4040
def __call__(self) -> Any: ...
4141

42+
class CurrentUserDefault(object):
43+
def set_context(self, serializer_field: Field) -> None: ...
44+
def __call__(self) -> Any: ...
45+
4246
class SkipField(Exception): ...
4347

4448
def set_value(dictionary: MutableMapping[str, Any], keys: Sequence[str], value: Any) -> None: ...

rest_framework-stubs/serializers.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ from rest_framework.fields import (
4747
ImageField as ImageField,
4848
SkipField as SkipField,
4949
CreateOnlyDefault as CreateOnlyDefault,
50+
CurrentUserDefault as CurrentUserDefault,
5051
)
5152
from rest_framework.exceptions import (
5253
APIException as APIException,

0 commit comments

Comments
 (0)