diff options
| author | Tom Christie | 2011-06-15 14:09:01 +0100 |
|---|---|---|
| committer | Tom Christie | 2011-06-15 14:09:01 +0100 |
| commit | 7dcb851c7f1e4bc01105fc5856494c196827fe2e (patch) | |
| tree | 7c0e02a8e504b66e7a33af69f8cd60ed1ad25df3 /docs/examples/modelviews.rst | |
| parent | 412b5fc2d54def2f2601b860b80afaa52d595e58 (diff) | |
| download | django-rest-framework-7dcb851c7f1e4bc01105fc5856494c196827fe2e.tar.bz2 | |
Allow related models to be fully serialized
Diffstat (limited to 'docs/examples/modelviews.rst')
| -rw-r--r-- | docs/examples/modelviews.rst | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/examples/modelviews.rst b/docs/examples/modelviews.rst index 7cc78d39..c60c9f24 100644 --- a/docs/examples/modelviews.rst +++ b/docs/examples/modelviews.rst @@ -25,7 +25,14 @@ Here's the model we're working from in this example: .. include:: ../../examples/modelresourceexample/models.py :literal: -To add an API for the model, all we need to do is create a Resource for the model, and map a couple of views to it in our urlconf. +To add an API for the model, first we need to create a Resource for the model. + +``resources.py`` + +.. include:: ../../examples/modelresourceexample/resources.py + :literal: + +Then we simply map a couple of views to the Resource in our urlconf. ``urls.py`` |
