Opened 16 years ago
Closed 14 years ago
#9158 closed (fixed)
django-admin.py print help to stderr
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Management commands) | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Dario Ocles | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Command django-admin.py help print this text to stdout:
Usage: django-admin.py subcommand [options] [args] Options: --settings=SETTINGS The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used. --pythonpath=PYTHONPATH A directory to add to the Python path, e.g. "/home/djangoprojects/myproject". --traceback Print traceback on exception --version show program's version number and exit -h, --help show this help message and exit
and this text to stderr:
Type 'django-admin.py help <subcommand>' for help on a specific subcommand. Available subcommands: cleanup compilemessages createcachetable dbshell diffsettings dumpdata flush inspectdb loaddata makemessages reset runfcgi runserver shell sql sqlall sqlclear sqlcustom sqlflush sqlindexes sqlinitialdata sqlreset sqlsequencereset startapp startproject syncdb test testserver validate
It is quite illogical. And it is not possible to do something as it:
django-admin.py help | grep sql
(It is also useful if there are some custom commands with common prefix and I want their list.)
Attached patch replaces all four occurrences in django.core.management.init from stderr to stdout. But the first and the second are real errors, patch with only the third and the fourth change could be better.
Attachments (3)
Change History (8)
by , 16 years ago
Attachment: | django-admin-stdout.diff added |
---|
comment:1 by , 16 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 14 years ago
Attachment: | django-admin-stdout2011.diff added |
---|
comment:2 by , 14 years ago
Cc: | added |
---|
comment:3 by , 14 years ago
Patch needs improvement: | set |
---|
by , 14 years ago
Attachment: | django-admin-stdout_with_test.diff added |
---|
Print just help info to stdout, print real errors to stderr. Fixed tests
comment:4 by , 14 years ago
Patch needs improvement: | unset |
---|
The patch was outdated. I updated this to the latest version.