6
You only need to specify either nargs='*'
, to allow 0 or more values, or nargs='+'
to allow 1 or more values, eg:
parser.add_argument(
'--group',
nargs='*',
help='set group(s) like "basic", "advanced"',
)
Also, you need to call your command without square brackets or commas:
py manage.py create_app_user --username dustin --password hdf --email "" --group "admin" "basic"
Source:stackexchange.com