@signalcommand
    def handle(self, *args, **kwargs):
        self.style = color_style()

        installed_apps = dict((a.__name__.rsplit('.', 1)[0], a) for a in models.get_apps())

        # Make sure we always have args
        if not args:
            args = [False]

        app = installed_apps.get(args[0])
        if not app:
            print(self.style.WARN('This command requires an existing app name as argument'))
            print(self.style.WARN('Available apps:'))
            for app in sorted(installed_apps):
                print(self.style.WARN('    %s' % app))
            sys.exit(1)

        model_res = []
        for arg in args[1:]:
            model_res.append(re.compile(arg, re.IGNORECASE))

        self.handle_app(app, model_res, **kwargs)
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/admin_generator.py/Command.handle/original