From c3342291111987b0f87e36d596268ce0a4867b7c Mon Sep 17 00:00:00 2001 From: Joe Michelini Date: Sun, 21 Mar 2021 15:32:10 -0400 Subject: [PATCH] update SerializerMethodField example --- docs/api-guide/fields.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index 0492af9aa..eeab382d8 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -583,6 +583,7 @@ The serializer method referred to by the `method_name` argument should accept a class Meta: model = User + fields = '__all__' def get_days_since_joined(self, obj): return (now() - obj.date_joined).days