From 5921e5c84e13cafe90061629262f12dfe742c07a Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Wed, 27 Apr 2011 18:53:54 +0100 Subject: Fix up ModelResource issues --- examples/blogpost/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') 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 -- cgit v1.2.3