Code

Opened 3 years ago

Closed 3 years ago

#16445 closed New feature (duplicate)

Grouping commands by app in ./manage.py help

Reported by: mariarchi Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Normal Keywords:
Cc: mariarchi Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

See django-dev for the example.

Attachments (1)

better_help_patch.patch (1.7 KB) - added by mariarchi 3 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 3 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement set

The idea looks good in theory. I'd like to test it on practice to see how good it looks, but the patch doesn't work.

trunk % PYTHONPATH=. django/bin/django-admin.py --help
Usage: django-admin.py subcommand [options] [args]

Options:
  -v VERBOSITY, --verbosity=VERBOSITY
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=all output
  --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
Traceback (most recent call last):
  File "django/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/Users/myk/Desktop/django-trunk/django/core/management/__init__.py", line 445, in execute_from_command_line
    utility.execute()
  File "/Users/myk/Desktop/django-trunk/django/core/management/__init__.py", line 389, in execute
    sys.stdout.write(self.main_help_text() + '\n')
  File "/Users/myk/Desktop/django-trunk/django/core/management/__init__.py", line 245, in main_help_text
    if isinstance(app, ProjectCommand):
NameError: global name 'ProjectCommand' is not defined

Changed 3 years ago by mariarchi

comment:2 Changed 3 years ago by mariarchi

Ooops sorry forgot an import. That was really fast reply.

See https://groups.google.com/forum/#!topic/django-developers/zrkBOXb8mJk for the detailed example.

comment:3 Changed 3 years ago by mariarchi

  • Cc mariarchi added
  • Patch needs improvement unset

comment:4 Changed 3 years ago by russellm

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #11745.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.