aboutsummaryrefslogtreecommitdiffstats
path: root/examples/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/urls.py')
-rw-r--r--examples/urls.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/examples/urls.py b/examples/urls.py
index 2b8e6fcd..41b80d58 100644
--- a/examples/urls.py
+++ b/examples/urls.py
@@ -5,18 +5,28 @@ from djangorestframework.resource import Resource
#admin.autodiscover()
class RootResource(Resource):
+ """This is the sandbox for the examples provided with django-rest-framework.
+
+ These examples are here to help you get a better idea of the some of the
+ features of django-rest-framework API, such as automatic form and model validation,
+ support for multiple input and output media types, etc...
+
+ Please feel free to browse, create, edit and delete the resources here, either
+ in the browser, from the command line, or programmatically."""
allowed_methods = anon_allowed_methods = ('GET',)
def get(self, request, auth):
- return {'simple example': self.reverse('simpleexample.views.MyModelRootResource'),
- 'pygments example': self.reverse('pygments_api.views.PygmentsRoot'),
- 'object store example': self.reverse('objectstore.views.ObjectStoreRoot'),
- 'blog post example': self.reverse('blogpost.views.BlogPostRoot'),}
+ return {'Simple Resource example': self.reverse('resourceexample.views.ExampleResource'),
+ 'Simple ModelResource example': self.reverse('modelresourceexample.views.MyModelRootResource'),
+ 'Object store API (Resource)': self.reverse('objectstore.views.ObjectStoreRoot'),
+ 'A pygments pastebin API (Resource + forms)': self.reverse('pygments_api.views.PygmentsRoot'),
+ 'Blog posts API (ModelResource)': self.reverse('blogpost.views.BlogPostRoot'),}
urlpatterns = patterns('',
(r'^$', RootResource),
- (r'^simple-example/', include('simpleexample.urls')),
+ (r'^model-resource-example/', include('modelresourceexample.urls')),
+ (r'^resource-example/', include('resourceexample.urls')),
(r'^object-store/', include('objectstore.urls')),
(r'^pygments/', include('pygments_api.urls')),
(r'^blog-post/', include('blogpost.urls')),