python 3.x - Create a Django custom command with multiple integer arguments -
i trying write django custom command, , need pass list of integers it. know basic structure of class command(basecommand):
, here questions:
- what should in
def add_arguments(self, parser):
method? - how retrieve values within
def handle(self, *args, **options):
method? - how calling command in command line? call that:
>> python manage.py my_command 1 2 3 4
, handle integers in handle()
thank you!
Comments
Post a Comment