Thanks Adam, nice solution.
On Sunday, 15 January 2023 at 19:23:56 UTC+10 Adam Johnson wrote:
> Hi Mark
>
> I agree that subparsers should use the same error formatting.
>
> After looking at the problem a bit more, I found a solution to pass
> called_from_command_line through to subparsers by ch
Hi Mark
I agree that subparsers should use the same error formatting.
After looking at the problem a bit more, I found a solution to pass
called_from_command_line through to subparsers by changing CommandParser. I
filed a ticket and a PR: https://code.djangoproject.com/ticket/34259#ticket
Thanks
I was just looking at custom management commands (Django 3.2) and noted
that the error handling for a subparser didn't match the Django behaviour
without some extra, undocumented work.
If my Command subclass implements the following:
def add_arguments(self, parser):
subparsers = pa