diff options
| author | Tom Christie | 2011-06-02 12:58:10 +0100 |
|---|---|---|
| committer | Tom Christie | 2011-06-02 12:58:10 +0100 |
| commit | b50492853f537a2473bb0a9eea86c8b0ed6b8824 (patch) | |
| tree | d289d39aacf187a8a0696a4c1c863aabe1472c3a /examples/modelresourceexample/views.py | |
| parent | 7ee9adbe5c03c29cd4a894dd476548f7fe73b5e4 (diff) | |
| parent | fc1640de75511006e89f033c9270ec91a9f1e4d4 (diff) | |
| download | django-rest-framework-b50492853f537a2473bb0a9eea86c8b0ed6b8824.tar.bz2 | |
pull in -dev as 0.2.0
Diffstat (limited to 'examples/modelresourceexample/views.py')
| -rw-r--r-- | examples/modelresourceexample/views.py | 18 |
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 |
