aboutsummaryrefslogtreecommitdiffstats
path: root/docs/examples
diff options
context:
space:
mode:
authorMarko Tibold2011-12-30 01:37:32 +0100
committerMarko Tibold2011-12-30 01:37:32 +0100
commit1b28339e5b733a0422c2bcd06b39e289bc98f69b (patch)
tree9e766f4f9d9ec596bc0e2702e1bb291b90aa3a93 /docs/examples
parent91cee26ad89c04a70f33ae334150dd127f900474 (diff)
parenta0c4dca9462c738aac3c712607997b9bd1f7b2c8 (diff)
downloaddjango-rest-framework-1b28339e5b733a0422c2bcd06b39e289bc98f69b.tar.bz2
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/blogpost.rst2
-rw-r--r--docs/examples/modelviews.rst10
-rw-r--r--docs/examples/objectstore.rst2
-rw-r--r--docs/examples/pygments.rst8
-rw-r--r--docs/examples/views.rst10
5 files changed, 16 insertions, 16 deletions
diff --git a/docs/examples/blogpost.rst b/docs/examples/blogpost.rst
index 597d715a..11e376ef 100644
--- a/docs/examples/blogpost.rst
+++ b/docs/examples/blogpost.rst
@@ -1,7 +1,7 @@
Blog Posts API
==============
-* http://api.django-rest-framework.org/blog-post/
+* http://rest.ep.io/blog-post/
The models
----------
diff --git a/docs/examples/modelviews.rst b/docs/examples/modelviews.rst
index 24e35f45..b67d50d9 100644
--- a/docs/examples/modelviews.rst
+++ b/docs/examples/modelviews.rst
@@ -5,11 +5,11 @@ Getting Started - Model Views
A live sandbox instance of this API is available:
- http://api.django-rest-framework.org/model-resource-example/
+ http://rest.ep.io/model-resource-example/
You can browse the API using a web browser, or from the command line::
- curl -X GET http://api.django-rest-framework.org/resource-example/ -H 'Accept: text/plain'
+ curl -X GET http://rest.ep.io/resource-example/ -H 'Accept: text/plain'
Often you'll want parts of your API to directly map to existing django models. Django REST framework handles this nicely for you in a couple of ways:
@@ -41,16 +41,16 @@ And we're done. We've now got a fully browseable API, which supports multiple i
We can visit the API in our browser:
-* http://api.django-rest-framework.org/model-resource-example/
+* http://rest.ep.io/model-resource-example/
Or access it from the command line using curl:
.. code-block:: bash
# Demonstrates API's input validation using form input
- bash: curl -X POST --data 'foo=true' http://api.django-rest-framework.org/model-resource-example/
+ bash: curl -X POST --data 'foo=true' http://rest.ep.io/model-resource-example/
{"detail": {"bar": ["This field is required."], "baz": ["This field is required."]}}
# Demonstrates API's input validation using JSON input
- bash: curl -X POST -H 'Content-Type: application/json' --data-binary '{"foo":true}' http://api.django-rest-framework.org/model-resource-example/
+ bash: curl -X POST -H 'Content-Type: application/json' --data-binary '{"foo":true}' http://rest.ep.io/model-resource-example/
{"detail": {"bar": ["This field is required."], "baz": ["This field is required."]}}
diff --git a/docs/examples/objectstore.rst b/docs/examples/objectstore.rst
index 601eeabb..0939fe9c 100644
--- a/docs/examples/objectstore.rst
+++ b/docs/examples/objectstore.rst
@@ -1,7 +1,7 @@
Object Store API
================
-* http://api.django-rest-framework.org/object-store/
+* http://rest.ep.io/object-store/
This example shows an object store API that can be used to store arbitrary serializable content.
diff --git a/docs/examples/pygments.rst b/docs/examples/pygments.rst
index 82a2ceed..4e72f754 100644
--- a/docs/examples/pygments.rst
+++ b/docs/examples/pygments.rst
@@ -6,11 +6,11 @@ We're going to provide a simple wrapper around the awesome `pygments <http://pyg
.. note::
- A live sandbox instance of this API is available at http://api.django-rest-framework.org/pygments/
+ A live sandbox instance of this API is available at http://rest.ep.io/pygments/
You can browse the API using a web browser, or from the command line::
- curl -X GET http://api.django-rest-framework.org/pygments/ -H 'Accept: text/plain'
+ curl -X GET http://rest.ep.io/pygments/ -H 'Accept: text/plain'
URL configuration
@@ -77,13 +77,13 @@ For example if we make a POST request using form input:
.. code-block:: bash
- bash: curl -X POST --data 'code=print "hello, world!"' --data 'style=foobar' -H 'X-Requested-With: XMLHttpRequest' http://api.django-rest-framework.org/pygments/
+ bash: curl -X POST --data 'code=print "hello, world!"' --data 'style=foobar' -H 'X-Requested-With: XMLHttpRequest' http://rest.ep.io/pygments/
{"detail": {"style": ["Select a valid choice. foobar is not one of the available choices."], "lexer": ["This field is required."]}}
Or if we make the same request using JSON:
.. code-block:: bash
- bash: curl -X POST --data-binary '{"code":"print \"hello, world!\"", "style":"foobar"}' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' http://api.django-rest-framework.org/pygments/
+ bash: curl -X POST --data-binary '{"code":"print \"hello, world!\"", "style":"foobar"}' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' http://rest.ep.io/pygments/
{"detail": {"style": ["Select a valid choice. foobar is not one of the available choices."], "lexer": ["This field is required."]}}
diff --git a/docs/examples/views.rst b/docs/examples/views.rst
index 0e02aa29..db0db0d7 100644
--- a/docs/examples/views.rst
+++ b/docs/examples/views.rst
@@ -5,11 +5,11 @@ Getting Started - Views
A live sandbox instance of this API is available:
- http://api.django-rest-framework.org/resource-example/
+ http://rest.ep.io/resource-example/
You can browse the API using a web browser, or from the command line::
- curl -X GET http://api.django-rest-framework.org/resource-example/ -H 'Accept: text/plain'
+ curl -X GET http://rest.ep.io/resource-example/ -H 'Accept: text/plain'
We're going to start off with a simple example, that demonstrates a few things:
@@ -41,16 +41,16 @@ Now we'll write our views. The first is a read only view that links to three in
That's us done. Our API now provides both programmatic access using JSON and XML, as well a nice browseable HTML view, so we can now access it both from the browser:
-* http://api.django-rest-framework.org/resource-example/
+* http://rest.ep.io/resource-example/
And from the command line:
.. code-block:: bash
# Demonstrates API's input validation using form input
- bash: curl -X POST --data 'foo=true' http://api.django-rest-framework.org/resource-example/1/
+ bash: curl -X POST --data 'foo=true' http://rest.ep.io/resource-example/1/
{"detail": {"bar": ["This field is required."], "baz": ["This field is required."]}}
# Demonstrates API's input validation using JSON input
- bash: curl -X POST -H 'Content-Type: application/json' --data-binary '{"foo":true}' http://api.django-rest-framework.org/resource-example/1/
+ bash: curl -X POST -H 'Content-Type: application/json' --data-binary '{"foo":true}' http://rest.ep.io/resource-example/1/
{"detail": {"bar": ["This field is required."], "baz": ["This field is required."]}}