aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pygments_api/views.py
diff options
context:
space:
mode:
authorTom Christie2011-06-15 14:09:01 +0100
committerTom Christie2011-06-15 14:09:01 +0100
commit7dcb851c7f1e4bc01105fc5856494c196827fe2e (patch)
tree7c0e02a8e504b66e7a33af69f8cd60ed1ad25df3 /examples/pygments_api/views.py
parent412b5fc2d54def2f2601b860b80afaa52d595e58 (diff)
downloaddjango-rest-framework-7dcb851c7f1e4bc01105fc5856494c196827fe2e.tar.bz2
Allow related models to be fully serialized
Diffstat (limited to 'examples/pygments_api/views.py')
-rw-r--r--examples/pygments_api/views.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/examples/pygments_api/views.py b/examples/pygments_api/views.py
index 76647107..e50029f6 100644
--- a/examples/pygments_api/views.py
+++ b/examples/pygments_api/views.py
@@ -46,19 +46,12 @@ class HTMLRenderer(BaseRenderer):
media_type = 'text/html'
-
-class PygmentsFormResource(FormResource):
- """
- """
- form = PygmentsForm
-
-
class PygmentsRoot(View):
"""
- This example demonstrates a simple RESTful Web API aound the awesome pygments library.
+ This example demonstrates a simple RESTful Web API around the awesome pygments library.
This top level resource is used to create highlighted code snippets, and to list all the existing code snippets.
"""
- resource = PygmentsFormResource
+ form = PygmentsForm
def get(self, request):
"""