Skip to content

Commit 6c5ff71

Browse files
committed
fix the way to use textarea rather than input with models.TextField
1 parent 201e7ea commit 6c5ff71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/utils/field_mapping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def get_field_kwargs(field_name, model_field):
8080
kwargs['decimal_places'] = decimal_places
8181

8282
if isinstance(model_field, models.TextField):
83-
kwargs['style'] = {'type': 'textarea'}
83+
kwargs['style'] = {'base_template': 'textarea.html'}
8484

8585
if isinstance(model_field, models.AutoField) or not model_field.editable:
8686
# If this field is read-only, then return early.

0 commit comments

Comments
 (0)