mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-27 03:54:01 +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['required'] = False
|
||||||
kwargs['default'] = model_field.get_default()
|
kwargs['default'] = model_field.get_default()
|
||||||
|
|
||||||
if model_field.__class__ == models.TextField:
|
if issubclass(model_field.__class__, models.TextField):
|
||||||
kwargs['widget'] = widgets.Textarea
|
kwargs['widget'] = widgets.Textarea
|
||||||
|
|
||||||
# TODO: TypedChoiceField?
|
# TODO: TypedChoiceField?
|
||||||
|
|
Loading…
Reference in New Issue
Block a user