#28524: Improve program name for Django's command-line utility.
-------------------------------------+-------------------------------------
               Reporter:  Nick Pope  |          Owner:  Nick Pope
                   Type:             |         Status:  assigned
  Cleanup/optimization               |
              Component:  Core       |        Version:  master
  (Management commands)              |
               Severity:  Normal     |       Keywords:  command-line
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 By default, according to the [[https://docs.djangoproject.com/en/dev/ref
 /django-admin/#usage|documentation]] there are three ways to execute
 Django's command-line utility:

 {{{#!sh
 $ django-admin <command> [options]
 $ manage.py <command> [options]
 $ python -m django <command> [options]
 }}}

 When executing the `help` command, however, the way these are rendered may
 be incorrect:

 {{{#!console
 $ django-admin help

 Type 'django-admin help <subcommand>' for help on a specific subcommand.
 ...
 }}}

 {{{#!console
 $ ./manage.py help

 Type 'manage.py help <subcommand>' for help on a specific subcommand.
 ...
 }}}

 {{{#!console
 $ python -m django help

 Type '__main__.py help <subcommand>' for help on a specific subcommand.
 ...
 }}}

 It should also be noted that `manage.py` will typically not work and
 `./manage.py` is required:

 {{{#!console
 $ manage.py help
 bash: manage.py: command not found
 }}}

 On Windows it will work, but only if the file type is associated with the
 Python interpreter and not an editor.

 So, the issues here are:

 1. `__main__.py` should be replaced by `python -m django` (or possibly use
 `os.path.basename(sys.executable)`)
 2. Should `manage.py` be replaced with `./manage.py` on non-Windows
 platforms? What about Windows?
 3. What should happen with the `manage.py` option in the documentation?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28524>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.8786a85fcc682c917527611d279b3ebd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to