There is some strange problem. When I do like this
def error_page(request):
return HttpResponseBadRequest
it raises My custom error page that I listed in main URLconf. But when I pass and exception there - I got just a blank page with the text of exception. For example, view is something like this:
def error_page(request):
return HttpResponseBadRequest('The error text')
And I get a blank page with the "The error text" text in body, but not my custom error page. How can I make Django use my Error page Template, but with error text?
I am using Python 3.5 and Django 1.10.4