title: DRF json 404 insetad of html page
body: <p>I would like to replace default django 404 (and other in the future) with the DRF response, as easy as it is possible, just to return (standard DRF response):</p>
  
  <pre class="lang-js prettyprint-override"><code>{
      "detail": "Not found."
  }
  </code></pre>
  
  <p>So I put this code in my url.py file.</p>
  
  <pre class="lang-js prettyprint-override"><code>from rest_framework.exceptions import NotFound
  from django.conf.urls import handler404
  handler404 = NotFound
  </code></pre>
  
  <p>When I set Debug flag (in the set Ture I'm geting 500, when set it to False 404 but in the html form.</p>
  
  <p>I've read doc here: <a href="http://www.django-rest-framework.org/api-guide/exceptions/" rel="noreferrer">http://www.django-rest-framework.org/api-guide/exceptions/</a> but to be honest I don't know how to put this into reality.</p>
  
  <p>it seems to be easy, but somehow I failed to implement this (above code comes form the other SO threads). </p>
  
  <p>Thank you in advance</p>