From 71e6c30034a1dd35a39ca74f86c371713e762c79 Mon Sep 17 00:00:00 2001 From: Joe Michelini <66066937+afolksetapart@users.noreply.github.com> Date: Mon, 22 Mar 2021 08:08:19 -0400 Subject: [PATCH] update SerializerMethodField example in docs (#7858) * update SerializerMethodField example * fix formatting --- 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..04f993942 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