def handle(self, *args, **options):

        if not settings.ENABLE_NOTICES:
            raise CommandError("Notifications are not enable in the system.")
        if not args:
            raise CommandError("You need to specify the report type.")
        elif not args[0] in self.report_types:
            raise CommandError("Report type invalid.")

        if len(args)==1:
            projects = Project.objects.all()
        else:
            projects = Project.objects.filter(slug__in=list(args[1:]))

        if not projects:
            raise CommandError("No project found with the given slug(s).")
        else:
            self.projects = projects
            self.report_type = args[0]

        # Find the function name to be called based on the report_type
        function_report_type = self.report_type.replace('-','_')

        #Call the related function to the wanted report_type
        self.__getattribute__(function_report_type)()
Override default method to make it work without arguments.
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/projects/management/commands/txreport.py/Command.handle