diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py index 6d0cb7ea3d..b6a7d53a0c 100644 --- a/django/core/management/__init__.py +++ b/django/core/management/__init__.py @@ -376,7 +376,6 @@ class ManagementUtility(object): parser = LaxOptionParser(usage="%prog subcommand [options] [args]", version=get_version(), option_list=BaseCommand.option_list) - self.autocomplete() try: options, args = parser.parse_args(self.argv) handle_default_options(options) @@ -391,6 +390,8 @@ class ManagementUtility(object): else: django.setup() + self.autocomplete() + try: subcommand = self.argv[1] except IndexError: