Renderer uses form field's label and help, not attribute name

This commit is contained in:
Markus Törnqvist 2013-05-18 15:15:02 +03:00
parent 764299843c
commit 1343398868

View File

@ -366,7 +366,8 @@ class BrowsableAPIRenderer(BaseRenderer):
if getattr(v, 'default', None) is not None: if getattr(v, 'default', None) is not None:
kwargs['initial'] = v.default kwargs['initial'] = v.default
kwargs['label'] = k kwargs['label'] = v.label
kwargs['help_text'] = v.help_text
fields[k] = v.form_field_class(**kwargs) fields[k] = v.form_field_class(**kwargs)