Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
abf0ee8b
Commit
abf0ee8b
authored
Dec 30, 2011
by
Marko Tibold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some more refactoring and some style enhancements. Just committing
to stay in sync.
parent
1b28339e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
48 deletions
+50
-48
docs/contents.rst
+9
-0
docs/examples.rst
+20
-6
docs/index.rst
+11
-41
docs/library.rst
+8
-0
docs/templates/layout.html
+2
-1
No files found.
docs/contents.rst
0 → 100644
View file @
abf0ee8b
Documentation
=============
.. toctree::
:maxdepth: 2
library
examples
docs/examples.rst
View file @
abf0ee8b
Examples
========
There are a few real world web API examples included with Django REST framework.
#. :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://rest.ep.io
(The :doc:`examples/sandbox` resource is also documented.)
Example Reference
-----------------
.. toctree::
.. toctree::
:maxdepth: 1
:maxdepth: 1
:glob:
examples/views
examples/*
examples/modelviews
examples/objectstore
examples/pygments
examples/blogpost
examples/sandbox
docs/index.rst
View file @
abf0ee8b
...
@@ -70,6 +70,13 @@ Getting Started
...
@@ -70,6 +70,13 @@ Getting Started
Using Django REST framework can be as simple as adding a few lines to your urlconf.
Using Django REST framework can be as simple as adding a few lines to your urlconf.
The following example exposes your `MyModel` model through an api. It will provide two views:
* A view which lists your model instances and simultaniously allows creation of instances
from that view.
* Another view which lets you view, update or delete your model instances individually.
``urls.py``::
``urls.py``::
from django.conf.urls.defaults import patterns, url
from django.conf.urls.defaults import patterns, url
...
@@ -85,27 +92,6 @@ Using Django REST framework can be as simple as adding a few lines to your urlco
...
@@ -85,27 +92,6 @@ Using Django REST framework can be as simple as adding a few lines to your urlco
url(r'
^(?
P
<
pk
>[^/]+)/$
', InstanceModelView.as_view(resource=MyResource)),
url(r'
^(?
P
<
pk
>[^/]+)/$
', InstanceModelView.as_view(resource=MyResource)),
)
)
Django REST framework comes with two "getting started" examples.
#. :doc:`examples/views`
#. :doc:`examples/modelviews`
Examples
--------
There are a few real world web API examples included with Django REST framework.
#. :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://rest.ep.io
(The :doc:`examples/sandbox` resource is also documented.)
How Tos, FAQs & Notes
How Tos, FAQs & Notes
---------------------
---------------------
...
@@ -117,31 +103,15 @@ How Tos, FAQs & Notes
...
@@ -117,31 +103,15 @@ How Tos, FAQs & Notes
howto/alternativeframeworks
howto/alternativeframeworks
howto/mixin
howto/mixin
Library Reference
.. include:: library.rst
-----------------
.. toctree::
:maxdepth: 1
library/authentication
.. include:: examples.rst
library/compat
library/mixins
library/parsers
library/permissions
library/renderers
library/resource
library/response
library/serializer
library/status
library/views
Example Reference
-----------------
.. toctree::
.. toctree::
:
maxdepth: 2
:
hidden:
examples.rst
contents
Indices and tables
Indices and tables
------------------
------------------
...
...
docs/library.rst
0 → 100644
View file @
abf0ee8b
Library
=======
.. toctree::
:maxdepth: 1
:glob:
library/*
docs/templates/layout.html
View file @
abf0ee8b
...
@@ -23,5 +23,6 @@
...
@@ -23,5 +23,6 @@
})();
})();
</script>
</script>
{% endblock %}{% block footer %}
{% endblock %}
{% block footer %}
<div
class=
"footer"
>
<p>
Documentation version {{ version }} {% endblock %}
</p></div>
<div
class=
"footer"
>
<p>
Documentation version {{ version }} {% endblock %}
</p></div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment