  
  Creating the resources
  ----------------------
  
  Once we have some existing models there's very little we need to do to create the corresponding resources.  We simply create a base resource and an instance resource for each model we're working with.
  django-rest-framework will provide the default operations on the resources all the usual input validation that Django's models can give us for free.
  
  #``views.py``
  
  #.. include:: ../../examples/blogpost/views.py
  #   :literal: 
</s> remove URL configuration
-----------------

``urls.py``

.. include:: ../../examples/blogpost/urls.py
    :literal:

 </s> add  </s> remove     
class ExampleResource(View):
 </s> add class ExampleView(View): </s> remove class MyFormValidation(FormResource):
    """
    A resource which applies form validation on the input.
    """
    form = MyForm
 </s> add  </s> remove from djangorestframework.resources import FormResource
 </s> add 
Once we have some existing models there's very little we need to do to create the API.
Firstly create a resource for each model that defines which fields we want to expose on the model.
Secondly we map a base view and an instance view for each resource.
The generic views :class:`.ListOrCreateModelView` and :class:`.InstanceModelView` provide default operations for listing, creating and updating our models via the API, and also automatically provide input validation using default ModelForms for each model.
  
  Creating the resources
  ----------------------
  
Once we have some existing models there's very little we need to do to create the API.
Firstly create a resource for each model that defines which fields we want to expose on the model.
Secondly we map a base view and an instance view for each resource.
The generic views :class:`.ListOrCreateModelView` and :class:`.InstanceModelView` provide default operations for listing, creating and updating our models via the API, and also automatically provide input validation using default ModelForms for each model.
Once we have some existing models there's very little we need to do to create the API.
Firstly create a resource for each model that defines which fields we want to expose on the model.
Secondly we map a base view and an instance view for each resource.
The generic views :class:`.ListOrCreateModelView` and :class:`.InstanceModelView` provide default operations for listing, creating and updating our models via the API, and also automatically provide input validation using default ModelForms for each model.
  
  #``views.py``
  
  #.. include:: ../../examples/blogpost/views.py
  #   :literal: 
keep keep keep keep replace replace keep keep keep keep keep
 More updating docs for 0.2

--HG--
rename : docs/examples/modelresources.rst => docs/examples/modelviews.rst
rename : docs/examples/resources.rst => docs/examples/views.rst 
docs/examples/blogpost.rst