[Django]-Django call command with parameters

3👍

You can just pass an arbitrary number of strings to the command:

call_command(prg_name, '--out=/tmp/111.txt', '--todos', '8', '12', '105', '51')

You can see these as the parameters that you would have passed to your program if you called it from the command line.

Leave a comment