def serve_500_error(request, *args, **kwargs):
 try:
  exc_info = sys.exc_info()
  if exc_info:
   if (desktop.conf.HTTP_500_DEBUG_MODE.get() and exc_info[0] and exc_info[1]):
    return django.views.debug.technical_500_response(request, *exc_info)
   else:
    return render('500.mako', request, {'traceback': traceback.extract_tb(exc_info[2])})
  else:
   return render('500.mako', request, {})
 finally:
  pass

def serve_500_error ( request , * args , ** kwargs ) : try : exc_info = sys . exc_info ( ) if exc_info : if ( desktop . conf . HTTP_500_DEBUG_MODE . get ( ) and exc_info [ 0 ] and exc_info [ 1 ] ) : return django . views . debug . technical_500_response ( request , * exc_info ) else : return render ( '500.mako' , request , { 'traceback' : traceback . extract_tb ( exc_info [ 2 ] ) } ) else : return render ( '500.mako' , request , { } ) finally : pass
registered handler for 500 .