def show_toolbar(request):
 if (request.META.get(u'REMOTE_ADDR', None) not in settings.INTERNAL_IPS):
  return False
 if request.is_ajax():
  return False
 return bool(settings.DEBUG)

def show_toolbar ( request ) : if ( request . META . get ( u'REMOTE_ADDR' , None ) not in settings . INTERNAL_IPS ) : return False if request . is_ajax ( ) : return False return bool ( settings . DEBUG )
default function to determine whether to show the toolbar on a given page .