mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 20:40:14 +03:00
Merge 646cadcc23
into 26623436f3
This commit is contained in:
commit
5174f0cf08
|
@ -1236,7 +1236,7 @@ class ModelSerializer(Serializer):
|
|||
Create a read only field for model methods and properties.
|
||||
"""
|
||||
field_class = ReadOnlyField
|
||||
field_kwargs = {}
|
||||
field_kwargs = {'help_text': getattr(model, field_name).__doc__}
|
||||
|
||||
return field_class, field_kwargs
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user