diff options
| author | Remi Paulmier | 2014-12-22 18:05:07 +0100 | 
|---|---|---|
| committer | Remi Paulmier | 2014-12-22 18:05:07 +0100 | 
| commit | 6c5ff712783ae7e6edebb52508f1d43249f1aa00 (patch) | |
| tree | bc973c9e950ae2d22991eb97f04cde475efe6bbe /rest_framework/utils | |
| parent | 201e7eaa4b468c68cbd716f1cdacc31d8908deaf (diff) | |
| download | django-rest-framework-6c5ff712783ae7e6edebb52508f1d43249f1aa00.tar.bz2 | |
fix the way to use textarea rather than input with models.TextField
Diffstat (limited to 'rest_framework/utils')
| -rw-r--r-- | rest_framework/utils/field_mapping.py | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/rest_framework/utils/field_mapping.py b/rest_framework/utils/field_mapping.py index fca97b4b..b16e9df0 100644 --- a/rest_framework/utils/field_mapping.py +++ b/rest_framework/utils/field_mapping.py @@ -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. | 
