aboutsummaryrefslogtreecommitdiffstats
path: root/examples/blogpost/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/blogpost/views.py')
-rw-r--r--examples/blogpost/views.py6
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