          get_absolute_url_override = settings.ABSOLUTE_URL_OVERRIDES.get(opts.label_lower)
          if get_absolute_url_override:
              setattr(cls, 'get_absolute_url', get_absolute_url_override)
  
          ensure_default_manager(cls)
  
          signals.class_prepared.send(sender=cls)
  
  
  class ModelState(object):
 
</s> remove             obj = self._default_manager.filter(**filter_args).filter(**{
                '_order__%s' % op: self._default_manager.values('_order').filter(**{
 </s> add             obj = self.__class__._default_manager.filter(**filter_args).filter(**{
                '_order__%s' % op: self.__class__._default_manager.values('_order').filter(**{ </s> remove         def reconstruct_manager(mgr):
            as_manager, manager_path, qs_path, args, kwargs = mgr.deconstruct()
            if as_manager:
                qs_class = import_string(qs_path)
                instance = qs_class.as_manager()
            else:
                manager_class = import_string(manager_path)
                instance = manager_class(*args, **kwargs)
            # We rely on the ordering of the creation_counter of the original
            # instance
            name = force_text(mgr.name)
            managers_mapping[name] = (mgr.creation_counter, instance)

        if hasattr(model, "_default_manager"):
            default_manager_name = force_text(model._default_manager.name)
            # Make sure the default manager is always the first
 </s> add         # Make sure the default manager is always first since ordering chooses
        # the default manager.
        if not model._default_manager.auto_created: </s> remove         manager = self.field.remote_field.model._default_manager
        # If the related manager indicates that it should be used for
        # related fields, respect that.
        if not getattr(manager, 'use_for_related_fields', False):
            manager = self.field.remote_field.model._base_manager
 </s> add         related_model = self.field.remote_field.model

        if (not related_model._meta.base_manager_name and
                getattr(related_model._default_manager, 'use_for_related_fields', False)):
            if not getattr(related_model._default_manager, 'silence_use_for_related_fields_deprecation', False):
                warnings.warn(
                    "use_for_related_fields is deprecated, instead "
                    "set Meta.base_manager_name on '{}'.".format(related_model._meta.label),
                    RemovedInDjango20Warning, 2
                )
            manager = related_model._default_manager
        else:
            manager = related_model._base_manager
 </s> remove         manager = self.related.related_model._default_manager
        # If the related manager indicates that it should be used for
        # related fields, respect that.
        if not getattr(manager, 'use_for_related_fields', False):
            manager = self.related.related_model._base_manager
 </s> add         related_model = self.related.related_model

        if (not related_model._meta.base_manager_name and
                getattr(related_model._default_manager, 'use_for_related_fields', False)):
            if not getattr(related_model._default_manager, 'silence_use_for_related_fields_deprecation', False):
                warnings.warn(
                    "use_for_related_fields is deprecated, instead "
                    "set Meta.base_manager_name on '{}'.".format(related_model._meta.label),
                    RemovedInDjango20Warning, 2
                )
            manager = related_model._default_manager
        else:
            manager = related_model._base_manager
 </s> remove         # Constructs all managers on the model
        managers_mapping = {}
 </s> add         managers = []
        if not opts.managers or cls._requires_legacy_default_manager():
            if any(f.name == 'objects' for f in opts.fields):
                raise ValueError(
                    "Model %s must specify a custom Manager, because it has a "
                    "field named 'objects'." % cls.__name__
                )
            manager = Manager()
            manager.auto_created = True
            cls.add_to_class('objects', manager)
          get_absolute_url_override = settings.ABSOLUTE_URL_OVERRIDES.get(opts.label_lower)
          if get_absolute_url_override:
              setattr(cls, 'get_absolute_url', get_absolute_url_override)
  
        if not opts.managers or cls._requires_legacy_default_manager():
            if any(f.name == 'objects' for f in opts.fields):
                raise ValueError(
                    "Model %s must specify a custom Manager, because it has a "
                    "field named 'objects'." % cls.__name__
                )
            manager = Manager()
            manager.auto_created = True
            cls.add_to_class('objects', manager)
  
          signals.class_prepared.send(sender=cls)
  
  
  class ModelState(object):
keep keep keep keep replace keep keep keep keep keep
 Fixed #10506, #13793, #14891, #25201 -- Introduced new APIs to specify models' default and base managers.

This deprecates use_for_related_fields.

Old API:

class CustomManager(models.Model):
    use_for_related_fields = True

class Model(models.Model):
    custom_manager = CustomManager()

New API:

class Model(models.Model):
    custom_manager = CustomManager()

    class Meta:
        base_manager_name = 'custom_manager'

Refs #20932, #25897.

Thanks Carl Meyer for the guidance throughout this work.
Thanks Tim Graham for writing the docs. 
django/db/models/base.py