#13240: Modify RelatedManager and ManyRelatedManager add() and remove() to 
accept
QuerySets and iterables
---------------------------------------------------+------------------------
          Reporter:  gabrielhurley                 |         Owner:  
gabrielhurley
            Status:  assigned                      |     Milestone:  1.3        
  
         Component:  Database layer (models, ORM)  |       Version:  SVN        
  
        Resolution:                                |      Keywords:             
  
             Stage:  Accepted                      |     Has_patch:  1          
  
        Needs_docs:  0                             |   Needs_tests:  0          
  
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by gabrielhurley):

  * needs_better_patch:  1 => 0
  * summary:  Modify RelatedManager and ManyRelatedManager add() and
              remove() to accept QuerySets => Modify
              RelatedManager and ManyRelatedManager add() and
              remove() to accept QuerySets and iterables
  * stage:  Ready for checkin => Accepted

Comment:

 I completely agree with modulatrix that any iterable that will yield
 appropriate objects should be accepted. In that spirit I completely re-
 wrote the patch and it now accepts exactly that.

 It's now a much cleaner solution, and in the process it improves the fall-
 through case and provides a more useful error message when passed
 arguments that cannot be added.

 The patch applies cleanly to trunk and passes the full test suite for me.
 Feel free to review and provide feedback!

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13240#comment:4>
Django <http://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 django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to