#26294: call_command doesn't raise same errors from option parsing as running
command
--------------------------------------+------------------------------------
     Reporter:  mbox                  |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Documentation         |                  Version:  master
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by claudep):

 * needs_better_patch:   => 0
 * component:  Testing framework => Documentation
 * needs_tests:   => 0
 * needs_docs:   => 0
 * type:  Uncategorized => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 This could be clearer in the docs. Something like that?
 {{{#!diff
 diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
 index 6a7752f..0a5de46 100644
 --- a/docs/ref/django-admin.txt
 +++ b/docs/ref/django-admin.txt
 @@ -1763,10 +1763,11 @@ To call a management command from code use
 ``call_command``.
    the name of the command to call.

  ``*args``
 -  a list of arguments accepted by the command.
 +  a list of arguments accepted by the command and fed to the parser.

  ``**options``
 -  named options accepted on the command-line.
 +  named options accepted on the command-line. Those will be directly
 passed to
 +  the command without triggering the argument parser.

  Examples::
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26294#comment:1>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.d709822a5c636c07b454d4f37f7b49d0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to