django_sorcery.management.base module¶
Namespaced Django command.
-
class
django_sorcery.management.base.NamespacedCommand(stdout=None, stderr=None, no_color=False, force_color=False)[source]¶ Bases:
django.core.management.base.BaseCommandNamespaced django command implementation.
-
commands¶ Returns the subcommands in the namespace.
-
create_parser(prog_name, subcommand)[source]¶ Create and return the
ArgumentParserwhich 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_from_argv(argv)[source]¶ 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--tracebackoption is present or the raisedExceptionis notCommandError, raise it.
-