Ticket #28398: candidate-commands.diff
File candidate-commands.diff, 1.2 KB (added by , 7 years ago) |
---|
-
./django/core/management/__init__.
old new 191 191 # (get_commands() swallows the original one) so the user is 192 192 # informed about it. 193 193 settings.INSTALLED_APPS 194 194 else: 195 195 sys.stderr.write("No Django settings specified.\n") 196 style = color_style() 197 candidates = " ".join(cmd for cmd in sorted(commands) if subcommand in cmd) 198 if candidates: 199 candidates = "%s: %s\n" % (style.SUCCESS("Possible candidates"), candidates) 196 200 sys.stderr.write( 197 "Unknown command: %r\nType '%s help' for usage.\n" 198 % (subcommand, self.prog_name) 201 "%s: %r\n%sOr type '%s help' for full usage.\n" 202 % (style.NOTICE("Unknown command"), subcommand, 203 candidates, self.prog_name) 199 204 ) 200 205 sys.exit(1) 201 206 if isinstance(app_name, BaseCommand): 202 207 # If the command is already loaded, use it directly. 203 208 klass = app_name