title: Django Rest Framework: what happened to my default Renderer?
body: <p>I would like calls to /contacts/1.json to return json, 1.api to return browsableAPI, and calls with format=None aka /contacts/1/ to return a template where we call render_form. This way end-users can have pretty forms, and developers can use the .api format, and ajax/apps etc use .json. Seems like a common use case but something isn't clicking for me here in DRF...</p>
  
  <p>Struggling with how DRF determines the Renderer used when no format is given. I found and then lost some info here on stack exchange that basically said to split the responses based on format. Adding the TemplateHTMLRenderer caused all sorts of pain. I had tried to split based on format but that is giving me JSON error below.</p>
  
  <p>I don't understand the de facto way to define what renderer should be used. Especially when no format is provided. I mean, it "just works" when using Response(data). And I can get the TemplateHTMLRenderer to work but at the cost of having no default Renderer.</p>
  
  <p>GET /contacts/1/ Gives the error: 
  <code>&lt;Contact: Contact object&gt; is not JSON serializable</code></p>
  
  <p>Using this code:</p>
  
  <pre><code>class ContactDetail(APIView):
  permission_classes = (permissions.IsAuthenticatedOrReadOnly,
                        IsOwnerOrReadOnly,)
  queryset = Contact.objects.all()
  renderer_classes = (BrowsableAPIRenderer, JSONRenderer, TemplateHTMLRenderer,)
  
  """
  Retrieve, update or delete a contact instance.
  """
  def get_object(self, pk):
      try:
          return Contact.objects.get(pk=pk)
      except Contact.DoesNotExist:
          raise Http404
  
  def get(self, request, pk, format=None):
      contact = self.get_object(pk)
      serializer = ContactSerializer(contact)
      if format == 'json' or format == "api":
          return Response(serializer.data)
      else:
          return Response({'contact': contact, 'serializer':serializer}, template_name="contact/contact_detail.html")        
  </code></pre>
  
  <p>But  GET /contacts/1.json , 1.api, or 1.html ALL give me the correct output. So it seems that I have created an issue with the content negotiation for the default i.e. format=None</p>
  
  <p>I must be missing something fundamental. I have gone through the 2 <a href="http://www.django-rest-framework.org/tutorial/quickstart/" rel="nofollow noreferrer">tutorials</a> and read the <a href="http://www.django-rest-framework.org/api-guide/renderers/" rel="nofollow noreferrer">Renderers</a> docs but I am unclear on what I messed up here as far as the default. I am NOT using the DEFAULT_RENDERERS in settings.py, didn't seem to make a difference if in default or inside the actual class as shown above.</p>
  
  <p>Also if anyone knows a way to use TemplateHTMLRenderer without needing to switch on format value, I'm all ears. </p>
  
  <p>EDIT: IF I use </p>
  
  <pre><code>if format == 'json' or format == "api" or format == None:
      return Response(serializer.data)
  else:
      return Response({'contact': contact, 'serializer':serializer},
  </code></pre>
  
  <p>Then I am shown the browsable API by default. Unfortunately, what I want is the Template HTML view by default, which is set to show forms for end users. I would like to keep the .api format for developers. </p>