Namespaced Django command.

class, stderr=None, no_color=False, force_color=False)[source]


Namespaced django command implementation.


Returns the subcommands in the namespace.

create_parser(prog_name, subcommand)[source]

Create and return the ArgumentParser which will be used to parse the arguments to this command.

print_help(prog_name, subcommand)[source]

Print the help message for this command, derived from self.usage().

run_command_from_argv(command, argv)[source]

Runs the subcommand with namespace adjusted argv.


Set up any environment changes requested (e.g., Python path and Django settings), then run this command. If the command raises a CommandError, intercept it and print it sensibly to stderr. If the --traceback option is present or the raised Exception is not CommandError, raise it.