Sorry, I have not done this, but if you look at this section:
https://docs.djangoproject.com/en/1.10/howto/custom-management-commands/#accepting-optional-arguments
then at the end there is a link from the word "argparse" to this site:
https://docs.python.org/3/library/argparse.html#module-argparse
Hi,
is there an possibility to use
https://docs.python.org/3/library/argparse.html#sub-commands
in the custom admin commands so I can have subcommands like
manage.py mycommand subcommand1 choice1-for-subcommand1
manage.py mycommand subcommand1 choice2-for-subcommand1
manage.py mycommand subcomma
2 matches
Mail list logo