  
  Custom managers and model inheritance
  -------------------------------------
  
  Here's how Django handles custom managers and
  :ref:`model inheritance <model-inheritance>`:
  
  1. Managers from base classes are always inherited by the child class,
     using Python's normal name resolution order (names on the child
     class override all others; then come names on the first parent class,
     and so on).
 
</s> remove 1. Managers from base classes are always inherited by the child class,
 </s> add #. Managers from base classes are always inherited by the child class, </s> remove 2. The default manager on a class is either the first manager declared on the
   class, if that exists, or the default manager of the first parent class in
   the parent hierarchy, if that exists. If no manager is explicitly declared,
   Django automatically creates the `objects` manager and it becomes the default
   manager.
 </s> add #. If no managers are declared on a model and/or its parents, Django
   automatically creates the ``objects`` manager.

#. The default manager on a class is either the one chosen with
   :attr:`Meta.default_manager_name
   <django.db.models.Options.default_manager_name>`, or the first manager
   declared on the model, or the default manager of the first parent model. </s> remove                 # Force this manager to be the first and thus default
                managers_mapping[default_manager_name] = (0, models.Manager())
            for manager in model._meta.managers:
                if manager.name == "_base_manager" or not manager.use_in_migrations:
                    continue
                reconstruct_manager(manager)
            # Sort all managers by their creation counter but take only name and
            # instance for further processing
            managers = [
                (name, instance) for name, (cc, instance) in
                sorted(managers_mapping.items(), key=lambda v: v[1])
            ]
            # If the only manager on the model is the default manager defined
            # by Django (`objects = models.Manager()`), this manager will not
            # be added to the model state.
            if managers == [('objects', models.Manager())]:
                managers = []
        else:
            managers = []
 </s> add                 default_manager = models.Manager()
                default_manager.model = model
                default_manager.name = model._default_manager.name
            managers.append((force_text(default_manager.name), default_manager))

        for manager in model._meta.managers:
            if manager.use_in_migrations and manager is not model._default_manager:
                manager = copy.copy(manager)
                manager._set_creation_counter()
                managers.append((force_text(manager.name), manager)) </s> remove ~~~~~~~~~~~~~~~~
 </s> add ----------------

.. attribute:: Model._default_manager
Here's how Django handles custom managers and :ref:`model inheritance
<model-inheritance>`:
  
  Custom managers and model inheritance
  -------------------------------------
  
Here's how Django handles custom managers and :ref:`model inheritance
<model-inheritance>`:
Here's how Django handles custom managers and :ref:`model inheritance
<model-inheritance>`:
  
  1. Managers from base classes are always inherited by the child class,
     using Python's normal name resolution order (names on the child
     class override all others; then come names on the first parent class,
     and so on).
keep keep keep keep replace 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. 
docs/topics/db/managers.txt