aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Christie2012-08-25 19:53:10 +0100
committerTom Christie2012-08-25 19:53:10 +0100
commit00d3aa21ba3bd5524932a692b75053a24ecbebd2 (patch)
treef648ec1299d329eda9d6af2f0703d744df8252d6
parent7d70948f9b348bdfd970dbd71c5ed2d02269ce3c (diff)
downloaddjango-rest-framework-00d3aa21ba3bd5524932a692b75053a24ecbebd2.tar.bz2
Updated sandbox links
-rw-r--r--djangorestframework/renderers.py2
-rw-r--r--docs/examples.rst2
-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/permissions.rst4
-rw-r--r--docs/examples/pygments.rst8
-rw-r--r--docs/examples/views.rst10
-rw-r--r--docs/howto/mixin.rst4
-rw-r--r--docs/howto/usingurllib2.rst8
-rw-r--r--docs/index.rst2
-rw-r--r--examples/sandbox/views.py4
12 files changed, 29 insertions, 29 deletions
diff --git a/djangorestframework/renderers.py b/djangorestframework/renderers.py
index 3d01582c..772002ba 100644
--- a/djangorestframework/renderers.py
+++ b/djangorestframework/renderers.py
@@ -370,7 +370,7 @@ class DocumentingTemplateRenderer(BaseRenderer):
class DocumentingHTMLRenderer(DocumentingTemplateRenderer):
"""
Renderer which provides a browsable HTML interface for an API.
- See the examples at http://api.django-rest-framework.org to see this in action.
+ See the examples at http://shielded-mountain-6732.herokuapp.com to see this in action.
"""
media_type = 'text/html'
diff --git a/docs/examples.rst b/docs/examples.rst
index 64088345..29e6a24c 100644
--- a/docs/examples.rst
+++ b/docs/examples.rst
@@ -9,7 +9,7 @@ There are a few real world web API examples included with Django REST framework.
All the examples are freely available for testing in the sandbox:
- http://rest.ep.io
+ http://shielded-mountain-6732.herokuapp.com
(The :doc:`examples/sandbox` resource is also documented.)
diff --git a/docs/examples/blogpost.rst b/docs/examples/blogpost.rst
index 11e376ef..1d191af3 100644
--- a/docs/examples/blogpost.rst
+++ b/docs/examples/blogpost.rst
@@ -1,7 +1,7 @@
Blog Posts API
==============
-* http://rest.ep.io/blog-post/
+* http://shielded-mountain-6732.herokuapp.com/blog-post/
The models
----------
diff --git a/docs/examples/modelviews.rst b/docs/examples/modelviews.rst
index b67d50d9..9bd27045 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://rest.ep.io/model-resource-example/
+ http://shielded-mountain-6732.herokuapp.com/model-resource-example/
You can browse the API using a web browser, or from the command line::
- curl -X GET http://rest.ep.io/resource-example/ -H 'Accept: text/plain'
+ curl -X GET http://shielded-mountain-6732.herokuapp.com/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://rest.ep.io/model-resource-example/
+* http://shielded-mountain-6732.herokuapp.com/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://rest.ep.io/model-resource-example/
+ bash: curl -X POST --data 'foo=true' http://shielded-mountain-6732.herokuapp.com/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://rest.ep.io/model-resource-example/
+ bash: curl -X POST -H 'Content-Type: application/json' --data-binary '{"foo":true}' http://shielded-mountain-6732.herokuapp.com/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 0939fe9c..81c1fcb6 100644
--- a/docs/examples/objectstore.rst
+++ b/docs/examples/objectstore.rst
@@ -1,7 +1,7 @@
Object Store API
================
-* http://rest.ep.io/object-store/
+* http://shielded-mountain-6732.herokuapp.com/object-store/
This example shows an object store API that can be used to store arbitrary serializable content.
diff --git a/docs/examples/permissions.rst b/docs/examples/permissions.rst
index eafc3255..a806d751 100644
--- a/docs/examples/permissions.rst
+++ b/docs/examples/permissions.rst
@@ -31,7 +31,7 @@ the example View below.:
The `IsAuthenticated` permission will only let a user do a 'GET' if he is authenticated. Try it
yourself on the live sandbox__
-__ http://rest.ep.io/permissions-example/loggedin
+__ http://shielded-mountain-6732.herokuapp.com/permissions-example/loggedin
Throttling
@@ -53,7 +53,7 @@ may do on our view to 10 requests per minute.:
Try it yourself on the live sandbox__.
-__ http://rest.ep.io/permissions-example/throttling
+__ http://shielded-mountain-6732.herokuapp.com/permissions-example/throttling
Now if you want a view to require both aurhentication and throttling, you simply declare them
both::
diff --git a/docs/examples/pygments.rst b/docs/examples/pygments.rst
index 4e72f754..4d1bb6ca 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://rest.ep.io/pygments/
+ A live sandbox instance of this API is available at http://shielded-mountain-6732.herokuapp.com/pygments/
You can browse the API using a web browser, or from the command line::
- curl -X GET http://rest.ep.io/pygments/ -H 'Accept: text/plain'
+ curl -X GET http://shielded-mountain-6732.herokuapp.com/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://rest.ep.io/pygments/
+ bash: curl -X POST --data 'code=print "hello, world!"' --data 'style=foobar' -H 'X-Requested-With: XMLHttpRequest' http://shielded-mountain-6732.herokuapp.com/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://rest.ep.io/pygments/
+ bash: curl -X POST --data-binary '{"code":"print \"hello, world!\"", "style":"foobar"}' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' http://shielded-mountain-6732.herokuapp.com/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 db0db0d7..829b10d5 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://rest.ep.io/resource-example/
+ http://shielded-mountain-6732.herokuapp.com/resource-example/
You can browse the API using a web browser, or from the command line::
- curl -X GET http://rest.ep.io/resource-example/ -H 'Accept: text/plain'
+ curl -X GET http://shielded-mountain-6732.herokuapp.com/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://rest.ep.io/resource-example/
+* http://shielded-mountain-6732.herokuapp.com/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://rest.ep.io/resource-example/1/
+ bash: curl -X POST --data 'foo=true' http://shielded-mountain-6732.herokuapp.com/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://rest.ep.io/resource-example/1/
+ bash: curl -X POST -H 'Content-Type: application/json' --data-binary '{"foo":true}' http://shielded-mountain-6732.herokuapp.com/resource-example/1/
{"detail": {"bar": ["This field is required."], "baz": ["This field is required."]}}
diff --git a/docs/howto/mixin.rst b/docs/howto/mixin.rst
index 1a84f2ad..98a31123 100644
--- a/docs/howto/mixin.rst
+++ b/docs/howto/mixin.rst
@@ -8,11 +8,11 @@ a browseable Web API, and much of the other goodness that Django REST framework
A live sandbox instance of this API is available for testing:
- * http://rest.ep.io/mixin/
+ * http://shielded-mountain-6732.herokuapp.com/mixin/
You can browse the API using a web browser, or from the command line::
- curl -X GET http://rest.ep.io/mixin/
+ curl -X GET http://shielded-mountain-6732.herokuapp.com/mixin/
URL configuration
diff --git a/docs/howto/usingurllib2.rst b/docs/howto/usingurllib2.rst
index 6320dc20..a14f8ddc 100644
--- a/docs/howto/usingurllib2.rst
+++ b/docs/howto/usingurllib2.rst
@@ -11,11 +11,11 @@ Here's an example which does a 'GET' on the `model-resource` example
in the sandbox.::
>>> import urllib2
- >>> r = urllib2.urlopen('htpp://rest.ep.io/model-resource-example')
+ >>> r = urllib2.urlopen('htpp://shielded-mountain-6732.herokuapp.com/model-resource-example')
>>> r.getcode() # Check if the response was ok
200
>>> print r.read() # Examin the response itself
- [{"url": "http://rest.ep.io/model-resource-example/1/", "baz": "sdf", "foo": true, "bar": 123}]
+ [{"url": "http://shielded-mountain-6732.herokuapp.com/model-resource-example/1/", "baz": "sdf", "foo": true, "bar": 123}]
Using the 'POST' method
-----------------------
@@ -29,11 +29,11 @@ to send the current time as as a string value for our POST.::
Now use the `Request` class and specify the 'Content-type'::
- >>> req = urllib2.Request('http://rest.ep.io/model-resource-example/', data=d, headers={'Content-Type':'application/x-www-form-urlencoded'})
+ >>> req = urllib2.Request('http://shielded-mountain-6732.herokuapp.com/model-resource-example/', data=d, headers={'Content-Type':'application/x-www-form-urlencoded'})
>>> resp = urllib2.urlopen(req)
>>> resp.getcode()
201
>>> resp.read()
- '{"url": "http://rest.ep.io/model-resource-example/4/", "baz": "Fri Dec 30 18:22:52 2011", "foo": false, "bar": 123}'
+ '{"url": "http://shielded-mountain-6732.herokuapp.com/model-resource-example/4/", "baz": "Fri Dec 30 18:22:52 2011", "foo": false, "bar": 123}'
That should get you started to write a client for your own api.
diff --git a/docs/index.rst b/docs/index.rst
index 5297bd99..486c934f 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -16,7 +16,7 @@ Django REST framework is a lightweight REST framework for Django, that aims to m
Features:
---------
-* Automatically provides an awesome Django admin style `browse-able self-documenting API <http://rest.ep.io>`_.
+* Automatically provides an awesome Django admin style `browse-able self-documenting API <http://shielded-mountain-6732.herokuapp.com>`_.
* Clean, simple, views for Resources, using Django's new `class based views <http://docs.djangoproject.com/en/dev/topics/class-based-views/>`_.
* Support for ModelResources with out-of-the-box default implementations and input validation.
* Pluggable :mod:`.parsers`, :mod:`renderers`, :mod:`authentication` and :mod:`permissions` - Easy to customise.
diff --git a/examples/sandbox/views.py b/examples/sandbox/views.py
index 8e3b3a10..86b3c28b 100644
--- a/examples/sandbox/views.py
+++ b/examples/sandbox/views.py
@@ -11,8 +11,8 @@ class Sandbox(View):
All the example APIs allow anonymous access, and can be navigated either through the browser or from the command line...
- bash: curl -X GET http://api.django-rest-framework.org/ # (Use default renderer)
- bash: curl -X GET http://api.django-rest-framework.org/ -H 'Accept: text/plain' # (Use plaintext documentation renderer)
+ bash: curl -X GET http://shielded-mountain-6732.herokuapp.com/ # (Use default renderer)
+ bash: curl -X GET http://shielded-mountain-6732.herokuapp.com/ -H 'Accept: text/plain' # (Use plaintext documentation renderer)
The examples provided: