There is a manager-team that I call
manage.py commandname xy
where x and y are the arguments to be used internally.
I need to pass some arguments that I will pull from * args:
from django.core.management.base import BaseCommand class Command(BaseCommand): [...] def handle(self, *args, **options): [...] var1 = args[0] var2 = args[1]
How can I make them pass them by name ?:
manage.py commandname -otp2 x -opt1 y
And how then to address them in function? How to make them mandatory and optional?
I guess that there is a simple solution, but I can’t correctly put the question to Google.