#17799: Default parameters in syncdb.Command().Execute()
-------------------------------------+-------------------------------------
     Reporter:  kacah222@…           |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core (Management     |                  Version:
  commands)                          |  1.4-beta-1
     Severity:  Normal               |               Resolution:
     Keywords:  syncdb               |             Triage Stage:  Design
    Has patch:  1                    |  decision needed
  Needs tests:  0                    |      Needs documentation:  0
Easy pickings:  0                    |  Patch needs improvement:  0
                                     |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by claudep):

 I suddenly realized that call_command was working around this by picking
 defaults from klass.option_list.
 {{{
     # Grab out a list of defaults from the options. optparse does this for
 us
     # when the script runs from the command line, but since call_command
 can
     # be called programatically, we need to simulate the loading and
 handling
     # of defaults (see #10080 for details).
 }}}

 Either we stick with the comment in call_command (and specifically add in
 the docs that execute should not be called directly):
 {{{
 This is the primary API you should use for calling specific commands.
 }}}

 Or we move the defaults value grabbing from call_command to execute
 (conditionally only when it is not run from command line).

 This might be the real design decision to make.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17799#comment:3>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to