오류 처리기입니다.
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
검사는 (* exc_info 요청을) 당신이 debug.technical_500_response
전달 디버거
# 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)
체크 여기 반환 debug.technical_500_response를 전달하는 경우
출처
2012-09-06 14:16:44
VGE
다른 곳에서 문제가 발생해야합니다. 트레이스 백 k 세부 정보 페이지는 여전히 django 1.4의 일부입니다. 디버그 모드 – jdi
어떻게 그 코드를 실행합니까? localhost 서버에 적절한 오류 정보가 표시됩니다. STATIC_URL을 (를) 사용하지만 MEDIA_URLS을 (를) 사용하여 충돌이 발생합니까? 게시물을 예제 설정에 대한 링크로 업데이트했습니다. – Tom
그리고'python manage.py runserver'를 사용하고 있습니까? 'runserver' 관리 명령은 로그를 유지하지 않으므로 실제 웹 서버를 실행하고 있음을 나타내는 것처럼 보입니다. –