0

I'm trying to pass the arguments in the console command. I'm using django framework. I'm trying something like the below command. for example.

Debug configuration in django framework:

python manage.py command_name args

This is how i configured but getting error

  • This links can help you : [1](https://stackoverflow.com/questions/13157809/writing-a-custom-management-command-with-args-and-options-explanation-of-field) --- [2](https://docs.djangoproject.com/en/1.11/howto/custom-management-commands/) --- [3](https://stackoverflow.com/questions/13812418/how-to-set-run-arguments-for-python-when-using-wing-ide) – Dubois Sep 21 '17 at 08:09

1 Answers1

-1

you can try to use sys library, something like that:

import sys
print "This is the name of the script: ", sys.argv[0]
print "Number of arguments: ", len(sys.argv)
print "The arguments are: " , str(sys.argv)
Ivan Sheihets
  • 802
  • 8
  • 17