@@ -117,7 +117,9 @@ A field that supports both read and write operations. By itself `WritableField`
...
@@ -117,7 +117,9 @@ A field that supports both read and write operations. By itself `WritableField`
A generic field that can be tied to any arbitrary model field. The `ModelField` class delegates the task of serialization/deserialization to it's associated model field. This field can be used to create serializer fields for custom model fields, without having to create a new custom serializer field.
A generic field that can be tied to any arbitrary model field. The `ModelField` class delegates the task of serialization/deserialization to it's associated model field. This field can be used to create serializer fields for custom model fields, without having to create a new custom serializer field.
The `ModelField` class is generally intended for internal use, but can be used by your API if needed. In order to properly instantiate a `ModelField`, it must be passed a field that is attached to an instantiated model. For example: `ModelField(model_field=MyModel()._meta.get_field('custom_field'))`
<ahref="https://twitter.com/share"class="twitter-share-button"data-url="django-rest-framework.org"data-text="Checking out the totally awesome Django REST framework! http://django-rest-framework.org"data-count="none">Tweet</a>
<ahref="https://twitter.com/share"class="twitter-share-button"data-url="django-rest-framework.org"data-text="Checking out the totally awesome Django REST framework! http://django-rest-framework.org"data-count="none"></a>