title: Writing a custom management command with args and options - explanation of fields needed
body: <p>In my django app I am writing a custom management command which will create an instance of an object based on the args passed and have the option of saving it to the database based on whether an option <code>--save</code> is passed or not.</p>
  
  <p>I've got a lot of help on this from the <a href="https://docs.djangoproject.com/en/2.2/howto/custom-management-commands/" rel="nofollow noreferrer">django documentation</a> itself. Have also got important pointers from <a href="https://stackoverflow.com/questions/10568864/two-arguments-in-django-admin-custom-command">here</a> about how to pass multiple arguments and <a href="https://stackoverflow.com/questions/4208006/how-does-one-use-django-custom-management-command-option">here</a> about how to have options.</p>
  
  <pre><code>from optparse import make_option
  
  class Command(BaseCommand):
    option_list = BaseCommand.option_list + (
      make_option('--delete',
          action='store_true',
          dest='delete',
          default=False,
          help='Delete poll instead of closing it'),
      )
  
    def handle(self, *args, **options):
      # ...
      if options['delete']:
          poll.delete()
      # ...
  </code></pre>
  
  <p>However I am not able to find a detailed explanation of the fields in make_option. For example <a href="http://nullege.com/codes/search/optparse.make_option" rel="nofollow noreferrer">optparse.make_option</a> lists </p>
  
  <pre><code>Instance attributes:
  _short_opts : [string]
  _long_opts : [string]
  
  action : string
  type : string
  dest : string
  default : any
  nargs : int
  const : any
  choices : [string]
  callback : function
  callback_args : (any*)
  callback_kwargs : { string : any }
  help : string
  metavar : string
  </code></pre>
  
  <p>In this <code>help</code> is self explanatory and I figured out what <code>dest</code> would mean, but I'm not clear what <code>action='store_true'</code> means. In fact it'd be great if someone could give me a short description of what all the arguments to <code>make_option</code> mean...</p>
  
  <p>Thanks a lot</p>