title: Custom Django 404 error
body: <p>I have a 404.html page, but in some cases I want to be able to send a json error message (for 404 and 500, etc.). I read the following page:</p>
  
  <p><a href="https://docs.djangoproject.com/en/dev/topics/http/views/#the-404-page-not-found-view" rel="noreferrer">https://docs.djangoproject.com/en/dev/topics/http/views/#the-404-page-not-found-view</a></p>
  
  <p>Is there any sort of example that shows the implementation? I have it in my urls.py but it's not being picked up in the event of an error.</p>