  --------
  
  Blah blah blah, examples here.
  
  Add a toctree for examples
  
  
  Library Reference
  -----------------
  
 
</s> remove Blah blah blah, examples here.
 </s> add There's a few real world examples included with django-rest-framework.
These demonstrate the following use cases:

#. Using :class:`.Resource` for resources that do not map to models.
#. Using :class:`.Resource` with forms for input validation.
#. Using :class:`.ModelResource` for resources that map directly to models.

All the examples are freely available for testing in the sandbox here: http://api.django-rest-framework.org

.. toctree::
  :maxdepth: 1

  examples/objectstore
  examples/pygments
  examples/blogpost

How Tos
-------

.. toctree::
  :maxdepth: 2

  howto/usingcurl </s> remove 
##### Comment Resources #####

COMMENT_FIELDS = ('username', 'comment', 'created', 'rating', 'absolute_url', 'blogpost_url')

class CommentList(QueryModelResource):
    """A resource which lists all existing comments for a given blog post."""
    allowed_methods = ('GET', )
    model = Comment
    fields = COMMENT_FIELDS

class CommentCreator(ModelResource):
    """A resource with which blog comments may be created for a given blog post."""
    allowed_methods = ('POST',)
 </s> add class CommentRoot(RootModelResource):
    """A resource which lists all existing comments for a given blog post, and creates new blog comments for a given blog post."""
    allowed_methods = ('GET', 'POST',) </s> remove         return ('blogpost.views.CommentList', (), {'blogpost_id': self.key})

    @property
    @models.permalink
    def comment_url(self):
        """Link to a resource which can create a comment for this blog post."""
        return ('blogpost.views.CommentCreator', (), {'blogpost_id': self.key})
 </s> add         return ('blogpost.views.CommentRoot', (), {'blogpost_id': self.key}) </s> remove     allowed_methods = ('read',)
 </s> add     """Resource with default operations for list.
    TODO: provide filter/order/num_results/paging, and a create operation to create queries."""
    allowed_methods = ('GET',)
.. note::
  --------
  
  Blah blah blah, examples here.
  
.. note::
  
  
  Library Reference
  -----------------
  
keep keep keep keep replace keep keep keep keep keep
 Lots of docs, trying to tidy up examples... 
docs/index.rst