          # Because of the way imports happen (recursively), we may or may not be
          # the first time this model tries to register with the framework. There
          # should only be one class for each model, so we always return the
          # registered version.
          return get_model(new_class._meta.app_label, name, False)
  
      def copy_managers(cls, base_managers):
          # This is in-place sorting of an Options attribute, but that's fine.
          base_managers.sort()
          for _, mgr_name, manager in base_managers:
 
</s> remove         m = get_model(new_class._meta.app_label, name, False)
 </s> add         m = get_model(new_class._meta.app_label, name,
                      seed_cache=False, only_installed=False) </s> remove     model = get_model(app_label, model_name, False)
 </s> add     model = get_model(app_label, model_name,
                      seed_cache=False, only_installed=False) </s> remove         return models.get_model(self.app_label, self.model)
 </s> add         return models.get_model(self.app_label, self.model,
                                only_installed=False)
        return get_model(new_class._meta.app_label, name,
                         seed_cache=False, only_installed=False)
          # Because of the way imports happen (recursively), we may or may not be
          # the first time this model tries to register with the framework. There
          # should only be one class for each model, so we always return the
          # registered version.
        return get_model(new_class._meta.app_label, name,
                         seed_cache=False, only_installed=False)
  
      def copy_managers(cls, base_managers):
          # This is in-place sorting of an Options attribute, but that's fine.
          base_managers.sort()
          for _, mgr_name, manager in base_managers:
keep keep keep keep replace keep keep keep keep keep
 Fixed #15866, #15850 -- Prevented get_model() and get_models() from returning not-installed models (by default). Thanks adsva for report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16053 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/db/models/base.py