class ManagementUtility:
Method | __init__ |
Undocumented |
Method | autocomplete |
Output completion suggestions for BASH. |
Method | execute |
Given the command-line arguments, figure out which subcommand is being run, create a parser appropriate to that command, and run it. |
Method | fetch_command |
Try to fetch the given subcommand, printing a message with the appropriate command called from the command line (usually "django-admin" or "manage.py") if it can't be found. |
Method | main_help_text |
Return the script's main help text, as a string. |
Instance Variable | argv |
Undocumented |
Instance Variable | prog_name |
Undocumented |
Instance Variable | settings_exception |
Undocumented |
Output completion suggestions for BASH.
The output of this function is passed to BASH's COMREPLY
variable and
treated as completion suggestions. COMREPLY
expects a space
separated string as the result.
The COMP_WORDS
and COMP_CWORD
BASH environment variables are used
to get information about the cli input. Please refer to the BASH
man-page for more information about this variables.
Subcommand options are saved as pairs. A pair consists of the long option string (e.g. '--exclude') and a boolean value indicating if the option requires arguments. When printing to stdout, an equal sign is appended to options which require arguments.
Note: If debugging this function, it is recommended to write the debug output in a separate file. Otherwise the debug output will be treated and formatted as potential completion suggestions.