aboutsummaryrefslogtreecommitdiffstats
path: root/examples/blogpost/resources.py
diff options
context:
space:
mode:
authorMarko Tibold2011-12-30 01:37:32 +0100
committerMarko Tibold2011-12-30 01:37:32 +0100
commit1b28339e5b733a0422c2bcd06b39e289bc98f69b (patch)
tree9e766f4f9d9ec596bc0e2702e1bb291b90aa3a93 /examples/blogpost/resources.py
parent91cee26ad89c04a70f33ae334150dd127f900474 (diff)
parenta0c4dca9462c738aac3c712607997b9bd1f7b2c8 (diff)
downloaddjango-rest-framework-1b28339e5b733a0422c2bcd06b39e289bc98f69b.tar.bz2
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'examples/blogpost/resources.py')
-rw-r--r--examples/blogpost/resources.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/blogpost/resources.py b/examples/blogpost/resources.py
index 9b91ed73..5a3c1ce2 100644
--- a/examples/blogpost/resources.py
+++ b/examples/blogpost/resources.py
@@ -12,16 +12,16 @@ class BlogPostResource(ModelResource):
ordering = ('-created',)
def comments(self, instance):
- return reverse('comments', kwargs={'blogpost': instance.key})
+ return reverse('comments', kwargs={'blogpost': instance.key})
class CommentResource(ModelResource):
"""
- A Comment is associated with a given Blog Post and has a *username* and *comment*, and optionally a *rating*.
+ A Comment is associated with a given Blog Post and has a *username* and *comment*, and optionally a *rating*.
"""
model = Comment
fields = ('username', 'comment', 'created', 'rating', 'url', 'blogpost')
ordering = ('-created',)
-
+
def blogpost(self, instance):
- return reverse('blog-post', kwargs={'key': instance.blogpost.key}) \ No newline at end of file
+ return reverse('blog-post', kwargs={'key': instance.blogpost.key})