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 ba
The optparse docs might be a little bit more helpful. You are basically telling the management function what each option you require should do.
The action keyword is the most telling and it configures what you want to do with that option - is it just a flag to do something special (a callback
, i.e. '--enable-feature') or should it accept a parameter for example (store
, i.e. '-things 10').
With that in mind, the rest of the options make a bit more sense with that all in mind. Read through 'option attributes' to get an explanation of what you've listed, and then 'actions' to see what I've mentioned above