#11745 closed Cleanup/optimization (fixed)
Categories by origin for command listings in "manage.py help"
Reported by: | Vlada Macek | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | help color django-admin manage.py |
Cc: | t.django@…, sebastien.fievet@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
As the number of loaded modules and apps grows for bigger project, simple alphabetic list of "manage.py help" commands becomes a pell-mell.
Very quickly I learn from which Python module the command I search is originating from. This applies the most for my own commands, even the most frequent situation is that I need to find my own mgmt command name for copy'n'paste.
The attached patch displays the help list with colored categories like this:
Available subcommands: [myapp] dump_all_objects import_images invalidate_memcached [django] cleanup compilemessages createcachetable createsuperuser dbshell ... [django_evolution] evolve [django_extensions] clean_pyc compile_pyc create_app create_command create_jobs ...
Attachments (2)
Change History (20)
by , 15 years ago
Attachment: | help-categories-with-colors.patch added |
---|
comment:1 by , 15 years ago
Cc: | added; removed |
---|
comment:2 by , 15 years ago
Component: | Uncategorized → Core framework |
---|
comment:3 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Cleanup/optimization |
comment:5 by , 14 years ago
Easy pickings: | unset |
---|---|
Keywords: | help color django-admin manage.py added |
milestone: | → 1.4 |
Applies cleanly to trunk. All the tests pass. I love this. It would be very useful on my current work project.
I've tested it on three different projects, a very simple one with only the 'django' module, a two-module one (django and south), and a very complex one (76 management commands in 11 modules). Works perfectly. Strong +1 from me.
Could someone try it on Windows and Mac, just to be 100%? If it works OK on those (it's using color_style, so it should) then it's Ready For Checkin.
comment:6 by , 13 years ago
This works fine however I see two problems with it:
- Its backwards incompatible, I am not sure if its a huge deal but someone could parse this list, having an option 'manage.py help --list' to get the old behavior would be fine.
- It's irritating, if an app overwrites a 'core' app, this command is under that app. See the South help list:
[south] convert_to_south datamigration graphmigrations migrate schemamigration startmigration syncdb test testserver
South overwrites 'test' and 'testserver' which I would expect under [django].
comment:7 by , 13 years ago
FWIW, I agree with bartTC's points, except that 'manage.py help --commands'
seems more fitting.
comment:8 by , 13 years ago
Patch needs improvement: | set |
---|
comment:9 by , 13 years ago
Component: | Core (Other) → Core (Management commands) |
---|
comment:10 by , 13 years ago
Cc: | added |
---|---|
UI/UX: | unset |
comment:13 by , 13 years ago
Patch needs improvement: | unset |
---|
I'm uploading a new patch with the implementation discussed on IRC with jezdez, tests and docs.
comment:14 by , 13 years ago
I've also made the implementation of version / --version consistent with help / --help while I was there.
by , 13 years ago
Attachment: | 11745-2.patch added |
---|
comment:15 by , 13 years ago
Owner: | changed from | to
---|
comment:17 by , 13 years ago
Easy pickings: | set |
---|---|
Needs documentation: | set |
Needs tests: | set |
Patch needs improvement: | set |
Severity: | Normal → Release blocker |
Type: | Cleanup/optimization → New feature |
UI/UX: | set |
comment:18 by , 13 years ago
Easy pickings: | unset |
---|---|
Needs documentation: | unset |
Needs tests: | unset |
Patch needs improvement: | unset |
Severity: | Release blocker → Normal |
Type: | New feature → Cleanup/optimization |
UI/UX: | unset |
revert spam
Categorizes the commands in the "manage.py help" list