How do I enable a Django custom command to accept multiple arguments? Suppose that my command is to be called process_data, and in myproject/myapp/management/commands/process_data.py I have the following:
class Command(BaseCommand):
def handle(self, *args, **options):
alpha = args[0]
beta = args[1]
And then call the command as follows:
>python manage.py process_data 5 16
I get the error:
manage.py: error: no such option: 16
This suggests that it sees my second argument 16 as part of **options, rather than a second argument in *args. How can I ensure that it is processed as an argument?