diff options
| author | Marko Tibold | 2011-12-30 01:36:43 +0100 | 
|---|---|---|
| committer | Marko Tibold | 2011-12-30 01:36:43 +0100 | 
| commit | 91cee26ad89c04a70f33ae334150dd127f900474 (patch) | |
| tree | 3f894d3da06c21ca57d22d7d55c607742f028d6c /docs | |
| parent | 500b0dcddc2d965a595eadadc70fb06d2648cc96 (diff) | |
| download | django-rest-framework-91cee26ad89c04a70f33ae334150dd127f900474.tar.bz2 | |
Some initial refactoring of the docs.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/conf.py | 4 | ||||
| -rw-r--r-- | docs/examples.rst | 9 | ||||
| -rw-r--r-- | docs/examples/blogpost.rst | 2 | ||||
| -rw-r--r-- | docs/examples/modelviews.rst | 2 | ||||
| -rw-r--r-- | docs/examples/objectstore.rst | 2 | ||||
| -rw-r--r-- | docs/examples/pygments.rst | 2 | ||||
| -rw-r--r-- | docs/examples/sandbox.rst | 2 | ||||
| -rw-r--r-- | docs/examples/views.rst | 2 | ||||
| -rw-r--r-- | docs/index.rst | 27 | 
9 files changed, 21 insertions, 31 deletions
diff --git a/docs/conf.py b/docs/conf.py index 78534ac3..16388814 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,8 +14,8 @@  import sys, os  sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) -sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'djangorestframework')) -sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'examples')) +sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'djangorestframework')) # for documenting the library +sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'examples')) # for importing settings  import settings  from django.core.management import setup_environ  setup_environ(settings) diff --git a/docs/examples.rst b/docs/examples.rst new file mode 100644 index 00000000..911ebdf3 --- /dev/null +++ b/docs/examples.rst @@ -0,0 +1,9 @@ +.. toctree:: +  :maxdepth: 1 + +  examples/views +  examples/modelviews +  examples/objectstore +  examples/pygments +  examples/blogpost +  examples/sandbox diff --git a/docs/examples/blogpost.rst b/docs/examples/blogpost.rst index be91913d..597d715a 100644 --- a/docs/examples/blogpost.rst +++ b/docs/examples/blogpost.rst @@ -1,5 +1,3 @@ -.. _blogposts: -  Blog Posts API  ============== diff --git a/docs/examples/modelviews.rst b/docs/examples/modelviews.rst index c60c9f24..24e35f45 100644 --- a/docs/examples/modelviews.rst +++ b/docs/examples/modelviews.rst @@ -1,5 +1,3 @@ -.. _modelviews: -  Getting Started - Model Views  ----------------------------- diff --git a/docs/examples/objectstore.rst b/docs/examples/objectstore.rst index 38bdbc98..601eeabb 100644 --- a/docs/examples/objectstore.rst +++ b/docs/examples/objectstore.rst @@ -1,5 +1,3 @@ -.. _objectstore: -  Object Store API  ================ diff --git a/docs/examples/pygments.rst b/docs/examples/pygments.rst index b4bc2c16..82a2ceed 100644 --- a/docs/examples/pygments.rst +++ b/docs/examples/pygments.rst @@ -1,5 +1,3 @@ -.. _codehighlighting: -  Code Highlighting API  ===================== diff --git a/docs/examples/sandbox.rst b/docs/examples/sandbox.rst index b6658ad9..ec465aaf 100644 --- a/docs/examples/sandbox.rst +++ b/docs/examples/sandbox.rst @@ -1,5 +1,3 @@ -.. _sandbox: -  Sandbox Root API  ================ diff --git a/docs/examples/views.rst b/docs/examples/views.rst index 59e13976..0e02aa29 100644 --- a/docs/examples/views.rst +++ b/docs/examples/views.rst @@ -1,5 +1,3 @@ -.. _views: -  Getting Started - Views  ----------------------- diff --git a/docs/index.rst b/docs/index.rst index 6038b7df..704055de 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -87,24 +87,23 @@ Using Django REST framework can be as simple as adding a few lines to your urlco  Django REST framework comes with two "getting started" examples. -#. :ref:`views` -#. :ref:`modelviews` +#. :doc:`examples/views` +#. :doc:`examples/modelviews`  Examples  --------  There are a few real world web API examples included with Django REST framework. -#. :ref:`objectstore` - Using :class:`views.View` classes for APIs that do not map to models. -#. :ref:`codehighlighting` - Using :class:`views.View` classes with forms for input validation. -#. :ref:`blogposts` - Using :class:`views.ModelView` classes for APIs that map directly to models. +#. :doc:`examples/objectstore` - Using :class:`views.View` classes for APIs that do not map to models. +#. :doc:`examples/pygments` - Using :class:`views.View` classes with forms for input validation. +#. :doc:`examples/blogpost` - Using :class:`views.ModelView` classes for APIs that map directly to models.  All the examples are freely available for testing in the sandbox:      http://api.django-rest-framework.org -(The :ref:`sandbox` resource is also documented.) - +(The :doc:`examples/sandbox` resource is also documented.)  How Tos, FAQs & Notes @@ -136,19 +135,13 @@ Library Reference    library/status    library/views -Examples Reference ------------------- +Example Reference +-----------------  .. toctree:: -  :maxdepth: 1 +  :maxdepth: 2 -  examples/views -  examples/modelviews -  examples/objectstore -  examples/pygments -  examples/blogpost -  examples/sandbox -  howto/mixin +  examples.rst  Indices and tables  ------------------  | 
