Skip to content

Commit 71e6c30

Browse files
update SerializerMethodField example in docs (#7858)
* update SerializerMethodField example * fix formatting
1 parent 7e3dd9c commit 71e6c30

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/api-guide/fields.md

+1
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ The serializer method referred to by the `method_name` argument should accept a
583583

584584
class Meta:
585585
model = User
586+
fields = '__all__'
586587

587588
def get_days_since_joined(self, obj):
588589
return (now() - obj.date_joined).days

0 commit comments

Comments
 (0)