          raise ErrorResponse(400, detail)
    
  
      def get_bound_form(self, data=None, files=None):
          """Given some content return a Django form bound to that content.
          If form validation is turned off (form class attribute is None) then returns None."""
          form_cls = getattr(self, 'form', None)
  
          if not form_cls:
              return None
  
          if data is not None:
              return form_cls(data, files)
  
 
</s> remove         return form_cls()
 </s> add         return self.form() </s> remove             return form_cls(data, files)
 </s> add             return self.form(data, files) </s> remove     ret = {}
    for name, field in form.fields.items():
        if not form.is_bound:
            data = form.initial.get(name, field.initial)
            if callable(data):
                data = data()
        else:
            if isinstance(field, FileField) and form.data is None:
                data = form.initial.get(name, field.initial)
            else:
                data = field.widget.value_from_datadict(form.data, form.files, name)
        ret[name] = field.prepare_value(data)
    return ret


class BaseResource(object):
    """Base class for all Resource classes, which simply defines the interface they provide."""
 </s> add     fields = None
    include = None
    exclude = None </s> remove     def validate(self, data, files):
 </s> add     def validate_request(self, data, files):
        """
        Given some content return a Django form bound to that content.
        If form validation is turned off (form class attribute is None) then returns None.
        """
        if not self.form:
          raise ErrorResponse(400, detail)
    
  
      def get_bound_form(self, data=None, files=None):
        """
        Given some content return a Django form bound to that content.
        If form validation is turned off (form class attribute is None) then returns None.
        """
        if not self.form:
        """
        Given some content return a Django form bound to that content.
        If form validation is turned off (form class attribute is None) then returns None.
        """
        if not self.form:
        """
        Given some content return a Django form bound to that content.
        If form validation is turned off (form class attribute is None) then returns None.
        """
        if not self.form:
        """
        Given some content return a Django form bound to that content.
        If form validation is turned off (form class attribute is None) then returns None.
        """
        if not self.form:
        """
        Given some content return a Django form bound to that content.
        If form validation is turned off (form class attribute is None) then returns None.
        """
        if not self.form:
              return None
  
          if data is not None:
              return form_cls(data, files)
  
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Sorting out resources.  Doing some crazy magic automatic url resolving stuff.  Yum. 
djangorestframework/resources.py