#15359 closed (fixed)
django-admin.py: -h option usage inconsistent with help output
Reported by: | teubank | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | 1.2 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The help text for django-admin.py shows -h
as a valid option, but using -h
produces an error message. (This discrepancy is admittedly a very minor, but unnecessary, bug.)
To reproduce:
$ django-admin -h Unknown command: '-h' Type 'django-admin help' for usage. $ django-admin help ... -h, --help show this help message and exit ...
The attached patches for releases 1.1.X and 1.2.X modify django/trunk/django/core/management/__init__.py
to accept -h
as a valid option.
- elif self.argv[1:] == ['--help']: + elif self.argv[1:] == ['--help'] or self.argv[1:] == ['-h']:
Note: Since the definition for the help
option is buried in optparse.py, modifying django/core/management/__init__.py
to accept -h
seems to be preferable to changing the help
option definition to reflect current usage.
Attachments (2)
Change History (6)
by , 14 years ago
Attachment: | 1.1.X.diff added |
---|
comment:1 by , 14 years ago
milestone: | 1.4 → 1.3 |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
svn diff for version 1.1.X