'Register a set of models as belonging to an app.'

def register_models(self, app_label, *models):

    for model in models:
        model_name = model._meta.model_name
        model_dict = self.app_models.setdefault(app_label, SortedDict())
        if (model_name in model_dict):
            fname1 = os.path.abspath(upath(sys.modules[model.__module__].__file__))
            fname2 = os.path.abspath(upath(sys.modules[model_dict[model_name].__module__].__file__))
            if (os.path.splitext(fname1)[0] == os.path.splitext(fname2)[0]):
                continue
        model_dict[model_name] = model
    self._get_models_cache.clear()
