              fields[k] = v.form_field_class(**kwargs)
  
          return fields
  
      def render(self, serializer, obj, request):
          fields = self.serializer_to_form_fields(serializer)
  
          # Creating an on the fly form see:
          # http://stackoverflow.com/questions/3915024/dynamically-creating-classes-python
          OnTheFlyForm = type(str("OnTheFlyForm"), (forms.Form,), fields)
          data = (obj is not None) and serializer.data or None
 
</s> remove         OnTheFlyForm = type(str("OnTheFlyForm"), (forms.Form,), fields)
        data = (obj is not None) and serializer.data or None
        form_instance = OnTheFlyForm(data)
 </s> add         fields = self.data_to_form_fields(data)
        DynamicForm = type(str('DynamicForm'), (forms.Form,), fields)
        data = None if data.empty else data </s> remove             fields[k] = v.form_field_class(**kwargs)
 </s> add             fields[key] = val.form_field_class(**kwargs) </s> remove         context = RequestContext(request, {'form': form_instance})
 </s> add         context = RequestContext(request, {'form': DynamicForm(data)}) </s> remove             if getattr(v, 'help_text', None) is not None:
                kwargs['help_text'] = v.help_text
 </s> add             if getattr(val, 'help_text', None) is not None:
                kwargs['help_text'] = val.help_text </s> remove     def get_form(self, view, method, request):
 </s> add     def get_rendered_html_form(self, view, method, request):
    def render(self, data, accepted_media_type=None, renderer_context=None):
        self.renderer_context = renderer_context or {}
        request = renderer_context['request']
              fields[k] = v.form_field_class(**kwargs)
  
          return fields
  
    def render(self, data, accepted_media_type=None, renderer_context=None):
        self.renderer_context = renderer_context or {}
        request = renderer_context['request']
    def render(self, data, accepted_media_type=None, renderer_context=None):
        self.renderer_context = renderer_context or {}
        request = renderer_context['request']
  
          # Creating an on the fly form see:
          # http://stackoverflow.com/questions/3915024/dynamically-creating-classes-python
          OnTheFlyForm = type(str("OnTheFlyForm"), (forms.Form,), fields)
          data = (obj is not None) and serializer.data or None
keep keep keep keep replace replace keep keep keep keep keep
 Cleanup and dealing with empty form data. 
rest_framework/renderers.py