mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 19:43:59 +03:00
Update rest_framework/serializers.py
This commit is contained in:
parent
141814585c
commit
85e6360792
|
@ -469,7 +469,7 @@ class ModelSerializer(Serializer):
|
|||
kwargs['required'] = False
|
||||
kwargs['default'] = model_field.get_default()
|
||||
|
||||
if model_field.__class__ == models.TextField:
|
||||
if issubclass(model_field.__class__, models.TextField):
|
||||
kwargs['widget'] = widgets.Textarea
|
||||
|
||||
# TODO: TypedChoiceField?
|
||||
|
|
Loading…
Reference in New Issue
Block a user