I made a custom handler404 for a authenticated Django website to avoid information leakage.
def check_logged_in_404(request): \"\"\" Custom 404. Show fr
I'd use render_to_string and HttpResponseNotFound, e.g. return HttpResponseNotFound(render_to_string('404.html')).
return HttpResponseNotFound(render_to_string('404.html'))