Skip to content

Commit

Permalink
fix the way to use textarea rather than input with models.TextField
Browse files Browse the repository at this point in the history
  • Loading branch information
shtouff committed Dec 22, 2014
1 parent 201e7ea commit 6c5ff71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework/utils/field_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_field_kwargs(field_name, model_field):
kwargs['decimal_places'] = decimal_places

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

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

0 comments on commit 6c5ff71

Please sign in to comment.