mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
fix the way to use textarea rather than input with models.TextField
This commit is contained in:
parent
201e7eaa4b
commit
6c5ff71278
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user