Undocumented
Function | find |
Undocumented |
Function | get |
Return the value of a command line option (which should include leading dashes, e.g. '--testrunner') from an argument list. Return None if the option wasn't passed or if the argument list couldn't be parsed. |
Function | get |
Return a 50 character random string usable as a SECRET_KEY setting value. |
Function | handle |
Organize multiple extensions that are separated with commas or passed by using --extension/-e multiple times. |
Function | is |
Check if the given path should be ignored or not based on matching one of the glob style `ignore_patterns`. |
Function | normalize |
Normalize an iterable of glob style patterns based on OS. |
Function | parse |
Parse a list of "app_label.ModelName" or "app_label" strings into actual objects and return a two-element tuple: (set of model classes, set of app_configs). Raise a CommandError if some specified models or apps don't exist. |
Function | popen |
Friendly wrapper around Popen. |
Function | run |
Run the black formatter on the specified files. |
Return the value of a command line option (which should include leading dashes, e.g. '--testrunner') from an argument list. Return None if the option wasn't passed or if the argument list couldn't be parsed.
Organize multiple extensions that are separated with commas or passed by using --extension/-e multiple times. For example: running 'django-admin makemessages -e js,txt -e xhtml -a' would result in an extension list: ['.js', '.txt', '.xhtml'] >>> handle_extensions(['.html', 'html,js,py,py,py,.py', 'py,.py']) {'.html', '.js', '.py'} >>> handle_extensions(['.html, txt,.tpl']) {'.html', '.tpl', '.txt'}
Check if the given path should be ignored or not based on matching one of the glob style `ignore_patterns`.
Parse a list of "app_label.ModelName" or "app_label" strings into actual objects and return a two-element tuple: (set of model classes, set of app_configs). Raise a CommandError if some specified models or apps don't exist.