def get_model(self):
        try:
            model = self.args[0]
        except IndexError:
            raise CommandError(u'Please supply at least one partitioned model')

        try:
            module_name, model_name = model.rsplit('.', 1)
        except ValueError:
            raise CommandError('Bad model name {}'.format(model))

        # So - we can't use get_model, because this will be an abstract model.
        # Try to grab the model directly from the module.
        module = importlib.import_module(module_name)
        try:
            m = getattr(module, model_name)
        except __HOLE__:
            raise CommandError('Unknown model {}'.format(model))
        return m
dataset/ETHPy150Open danfairs/django-parting/parting/management/commands/ensure_partition.py/Command.get_model