How to redefine a 404 error to send arguments to a function?
It is necessary to poison the argument error and text
# views.py def handler404(request, error, text): response = render_to_response('error/40X.html', {'error': error, 'text':text}) response.status_code = error return response And the 404 error override code:
handler404 = 'app.views.handler404' I use Django v1.10 and Python v3.5, and I don’t really want to create a function for each error.
handler404 = 'app.views.handler404', perhaps there is another way to set a unique page for HTTP errors - users