call the self.stderr.write method with string " Failed to install index for %s.%s model: %s\n" as argument,
self . stderr . write ( " Failed to install index for %s.%s model: %s\n" % ( app_name , model . _meta . object_name , e ) )