From 02fcf6a3346a9d47a6c4297fd562708feb27ed89 Mon Sep 17 00:00:00 2001 From: SerenityCode Date: Wed, 12 Oct 2016 09:46:59 +0100 Subject: [PATCH] Use field name instead of source when generating docs (#4559) --- rest_framework/schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/schemas.py b/rest_framework/schemas.py index 69698db0e..af861426c 100644 --- a/rest_framework/schemas.py +++ b/rest_framework/schemas.py @@ -477,7 +477,7 @@ class SchemaGenerator(object): required = field.required and method != 'PATCH' description = force_text(field.help_text) if field.help_text else '' field = coreapi.Field( - name=field.source, + name=field.field_name, location='form', required=required, description=description,