In adding options to custom commands the doc stop too early and therefor miss an important information
|Reported by:||purple@…||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Here: https://docs.djangoproject.com/en/1.4/howto/custom-management-commands/ starting here:
"The same closepoll could be easily modified to delete a given poll instead of closing it by accepting additional command line options. These custom options ..."
The documentation doesn't say anywhere that the option will be stored in the dict "options" pass as argument of the method. As obvious as it sounds I've add to google it to find this information and apparently I'm far from being the only one: http://stackoverflow.com/questions/4208006/how-does-one-use-django-custom-management-command-option (it's sad that no one since 2010 has repported this bug :/).
Documentation should always state the obvious.
Change History (4)
Changed 4 years ago by claudep
comment:1 Changed 4 years ago by claudep
- Has patch set
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
- Type changed from Bug to Cleanup/optimization