mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
Some initial refactoring of the docs.
This commit is contained in:
parent
500b0dcddc
commit
91cee26ad8
|
@ -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)
|
||||
|
|
9
docs/examples.rst
Normal file
9
docs/examples.rst
Normal file
|
@ -0,0 +1,9 @@
|
|||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
examples/views
|
||||
examples/modelviews
|
||||
examples/objectstore
|
||||
examples/pygments
|
||||
examples/blogpost
|
||||
examples/sandbox
|
|
@ -1,5 +1,3 @@
|
|||
.. _blogposts:
|
||||
|
||||
Blog Posts API
|
||||
==============
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.. _modelviews:
|
||||
|
||||
Getting Started - Model Views
|
||||
-----------------------------
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.. _objectstore:
|
||||
|
||||
Object Store API
|
||||
================
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.. _codehighlighting:
|
||||
|
||||
Code Highlighting API
|
||||
=====================
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.. _sandbox:
|
||||
|
||||
Sandbox Root API
|
||||
================
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.. _views:
|
||||
|
||||
Getting Started - Views
|
||||
-----------------------
|
||||
|
||||
|
|
|
@ -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
|
||||
------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user