diff options
| author | Tom Christie | 2013-06-04 20:23:16 +0100 | 
|---|---|---|
| committer | Tom Christie | 2013-06-04 20:23:16 +0100 | 
| commit | ffa27b840f66d24562de9f66a9ac7a4142da51db (patch) | |
| tree | a950efe77a052e8d98b98b7fdc1ceb88599311e8 /docs | |
| parent | c160e49321d77c6b1b99fc898e2624760edc137b (diff) | |
| download | django-rest-framework-ffa27b840f66d24562de9f66a9ac7a4142da51db.tar.bz2 | |
Fix ModelField docs.  Closes #909.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api-guide/fields.md | 4 | ||||
| -rw-r--r-- | docs/index.md | 4 | 
2 files changed, 5 insertions, 3 deletions
| diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index c7db32ed..94fff7e2 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -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. -**Signature:** `ModelField(model_field=<Django ModelField class>)` +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'))` + +**Signature:** `ModelField(model_field=<Django ModelField instance>)`  ## SerializerMethodField diff --git a/docs/index.md b/docs/index.md index d944ddd4..0fb5706e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,10 +1,10 @@  <p class="badges">  <iframe src="http://ghbtns.com/github-btn.html?user=tomchristie&repo=django-rest-framework&type=watch&count=true" class="github-star-button" allowtransparency="true" frameborder="0" scrolling="0" width="110px" height="20px"></iframe> -<a href="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> +<a href="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>  <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> -<img alt="Travis build image" src="https://secure.travis-ci.org/tomchristie/django-rest-framework.png?branch=master" class="travis-build-image"> +<img src="https://secure.travis-ci.org/tomchristie/django-rest-framework.png?branch=master" class="travis-build-image">  </p>  # Django REST framework | 
