diff options
| author | Tom Christie | 2011-04-27 18:53:54 +0100 |
|---|---|---|
| committer | Tom Christie | 2011-04-27 18:53:54 +0100 |
| commit | 5921e5c84e13cafe90061629262f12dfe742c07a (patch) | |
| tree | 2d56ef1264b47704a4f9042aa5c6cb1cea4d465d /examples | |
| parent | 5a59f339c1757767b136de33faa5b67a972141a1 (diff) | |
| download | django-rest-framework-5921e5c84e13cafe90061629262f12dfe742c07a.tar.bz2 | |
Fix up ModelResource issues
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/blogpost/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/blogpost/views.py b/examples/blogpost/views.py index 9e07aa8a..e47f4a5b 100644 --- a/examples/blogpost/views.py +++ b/examples/blogpost/views.py @@ -1,4 +1,4 @@ -from djangorestframework.modelresource import ModelResource, RootModelResource +from djangorestframework.modelresource import InstanceModelResource, RootModelResource from blogpost import models @@ -11,7 +11,7 @@ class BlogPosts(RootModelResource): model = models.BlogPost fields = BLOG_POST_FIELDS -class BlogPostInstance(ModelResource): +class BlogPostInstance(InstanceModelResource): """A resource which represents a single blog post.""" model = models.BlogPost fields = BLOG_POST_FIELDS @@ -21,7 +21,7 @@ class Comments(RootModelResource): model = models.Comment fields = COMMENT_FIELDS -class CommentInstance(ModelResource): +class CommentInstance(InstanceModelResource): """A resource which represents a single comment.""" model = models.Comment fields = COMMENT_FIELDS |
