title: How to use handler404 view in django?
body: <p>I want to display a 404 error page when user hits a url which is not in the urls.py. 
  In settings.py I put DEBUG = False,and I have written a handler view like this</p>
  
  <pre><code>def handler404(request):
    from django.shortcuts import render
    return render(request, '404.html')
  </code></pre>
  
  <p>and in urls.py I have included</p>
  
  <p>handler404 = 'myapp.handlerview'</p>
  
  <p>Now whenever I am entering a url which is not in the urls list then I am getting 500 server error.I want to display 404.html page instead of 500 internal server error.</p>