mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 19:40:13 +03:00
Remove read_only
from CreateOnlyDefault
example.
In this context (without mentioning `save`) now slightly misleading.
This commit is contained in:
parent
d64e88e467
commit
de92e965be
|
@ -189,7 +189,6 @@ A default class that can be used to *only set a default argument during create o
|
||||||
It takes a single argument, which is the default value or callable that should be used during create operations.
|
It takes a single argument, which is the default value or callable that should be used during create operations.
|
||||||
|
|
||||||
created_at = serializers.DateTimeField(
|
created_at = serializers.DateTimeField(
|
||||||
read_only=True,
|
|
||||||
default=serializers.CreateOnlyDefault(timezone.now)
|
default=serializers.CreateOnlyDefault(timezone.now)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user