aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Christie2011-05-16 15:57:10 +0100
committerTom Christie2011-05-16 15:57:10 +0100
commit75cc1eb2a85c2e8ef872566c0b798c6526a23cb3 (patch)
tree95743e300a9e9c62d109477e0e60e7d08d8e1d88
parent1e04790d505a1174f9e3c4481288982f9e7fd6c0 (diff)
downloaddjango-rest-framework-75cc1eb2a85c2e8ef872566c0b798c6526a23cb3.tar.bz2
blogpost/views no longer needed
-rw-r--r--examples/blogpost/views.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/examples/blogpost/views.py b/examples/blogpost/views.py
deleted file mode 100644
index c4b54f73..00000000
--- a/examples/blogpost/views.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from djangorestframework.modelresource import InstanceModelResource, ListOrCreateModelResource
-
-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')
-
-class BlogPosts(ListOrCreateModelResource):
- """A resource with which lists all existing blog posts and creates new blog posts."""
- model = models.BlogPost
- fields = BLOG_POST_FIELDS
-
-class BlogPostInstance(InstanceModelResource):
- """A resource which represents a single blog post."""
- model = models.BlogPost
- fields = BLOG_POST_FIELDS
-
-class Comments(ListOrCreateModelResource):
- """A resource which lists all existing comments for a given blog post, and creates new blog comments for a given blog post."""
- model = models.Comment
- fields = COMMENT_FIELDS
-
-class CommentInstance(InstanceModelResource):
- """A resource which represents a single comment."""
- model = models.Comment
- fields = COMMENT_FIELDS
-