[Answer]-Django 1.4 Local 500 Error Page

1👍

The error handler
is located in django.core.handler.base try to debug the handle_uncaught_exception function.

def handle_uncaught_exception(self, request, resolver, exc_info):
    """
    Processing for any otherwise uncaught exceptions (those that will
    generate HTTP 500 responses). Can be overridden by subclasses who want
    customised 500 handling.

    Be *very* careful when overriding this because the error could be
    caused by anything, so assuming something like the database is always
    available would be an error.
    """
    from django.conf import settings

    if settings.DEBUG_PROPAGATE_EXCEPTIONS:
        raise

    logger.error('Internal Server Error: %s', request.path,
        exc_info=exc_info,
        extra={
            'status_code': 500,
            'request': request
        }
    )

    if settings.DEBUG:
        from django.views import debug

check if you pass here
return debug.technical_500_response(request, *exc_info)

    # If Http500 handler is not installed, re-raise last exception
    if resolver.urlconf_module is None:
        raise exc_info[1], None, exc_info[2]
    # Return an HttpResponse that displays a friendly error message.
    callback, param_dict = resolver.resolve500()
    return callback(request, **param_dict)

check with the debugger that you pass in debug.technical_500_response

👤VGE

Leave a comment