aboutsummaryrefslogtreecommitdiffstats
path: root/examples/blogpost/views.py
diff options
context:
space:
mode:
authormarkotibold2011-03-11 12:47:16 +0100
committermarkotibold2011-03-11 12:47:16 +0100
commitecb82b0318f5dae29f4a00416fb279dff549c3b1 (patch)
tree5981e8c34ebdfb6ba0bd393dad608a881d2fffdf /examples/blogpost/views.py
parentd6e7e95d95e7367f0d999c14d874d810a028a177 (diff)
downloaddjango-rest-framework-ecb82b0318f5dae29f4a00416fb279dff549c3b1.tar.bz2
Refactoring and added another test for blog-posts. Finally got eclipse setup properly with virtualenvs (code analysis). Also I think I get Bitbuckets workflow now.
Diffstat (limited to 'examples/blogpost/views.py')
-rw-r--r--examples/blogpost/views.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/blogpost/views.py b/examples/blogpost/views.py
index ef970466..59a3fb9f 100644
--- a/examples/blogpost/views.py
+++ b/examples/blogpost/views.py
@@ -1,13 +1,10 @@
-from djangorestframework.response import Response
-from djangorestframework.resource import Resource
from djangorestframework.modelresource import ModelResource, RootModelResource
-from djangorestframework import status
from blogpost import models
BLOG_POST_FIELDS = ('created', 'title', 'slug', 'content', 'absolute_url', 'comment_url', 'comments_url')
COMMENT_FIELDS = ('username', 'comment', 'created', 'rating', 'absolute_url', 'blogpost_url')
-
+MAX_POSTS = 10
class BlogPosts(RootModelResource):
"""A resource with which lists all existing blog posts and creates new blog posts."""