aboutsummaryrefslogtreecommitdiffstats
path: root/examples/modelresourceexample/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/modelresourceexample/views.py')
-rw-r--r--examples/modelresourceexample/views.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/examples/modelresourceexample/views.py b/examples/modelresourceexample/views.py
index e912c019..e69de29b 100644
--- a/examples/modelresourceexample/views.py
+++ b/examples/modelresourceexample/views.py
@@ -1,18 +0,0 @@
-from djangorestframework.modelresource import ModelResource, RootModelResource
-from modelresourceexample.models import MyModel
-
-FIELDS = ('foo', 'bar', 'baz', 'absolute_url')
-
-class MyModelRootResource(RootModelResource):
- """A create/list resource for MyModel.
- Available for both authenticated and anonymous access for the purposes of the sandbox."""
- model = MyModel
- allowed_methods = anon_allowed_methods = ('GET', 'POST')
- fields = FIELDS
-
-class MyModelResource(ModelResource):
- """A read/update/delete resource for MyModel.
- Available for both authenticated and anonymous access for the purposes of the sandbox."""
- model = MyModel
- allowed_methods = anon_allowed_methods = ('GET', 'PUT', 'DELETE')
- fields = FIELDS