          finally:
              self.write_lock.release()
  
      def load_app(self, app_name, can_postpone=False):
          """
          Loads the app with the provided fully qualified name, and returns the
          model module.
          """
          self.handled[app_name] = None
 
</s> remove     def get_model(self, app_label, model_name, seed_cache=True):
 </s> add     def get_model(self, app_label, model_name,
                  seed_cache=True, only_installed=True): </s> remove     def get_models(self, app_mod=None, include_auto_created=False, include_deferred=False):
 </s> add     def get_models(self, app_mod=None,
                   include_auto_created=False, include_deferred=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 get_model(new_class._meta.app_label, name, False)
 </s> add         return get_model(new_class._meta.app_label, name,
                         seed_cache=False, only_installed=False)
    def _label_for(self, app_mod):
        """
        Return app_label for given models module.

        """
        return app_mod.__name__.split('.')[-2]

          finally:
              self.write_lock.release()
  
    def _label_for(self, app_mod):
        """
        Return app_label for given models module.

        """
        return app_mod.__name__.split('.')[-2]

      def load_app(self, app_name, can_postpone=False):
          """
          Loads the app with the provided fully qualified name, and returns the
          model module.
          """
          self.handled[app_name] = None
keep keep add keep 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/loading.py