#13240: Modify RelatedManager and ManyRelatedManager add() and remove() to accept QuerySets ------------------------------------------+--------------------------------- Reporter: gabrielhurley | Owner: gabrielhurley Status: new | Milestone: Component: Database layer (models, ORM) | Version: SVN Keywords: | Stage: Unreviewed Has_patch: 1 | ------------------------------------------+--------------------------------- I was surprised today to realize that the ``add()`` and ``remove()`` methods on ``ManyRelatedManager`` didn't work when passed a ``QuerySet``. It seemed like they ought to, so I wrote up a patch.
The patch allows the ``*objs`` argument to ``RelatedManager.add()``, ``RelatedManager.remove()``, ``ManyRelatedManager.add()``, and ``ManyRelatedManager.remove()`` to accept any number of either objects or querysets (of the appropriate model, of course). The change passes the full test suite, includes new tests, and adds a note in the docs. I understand if it's too late to make it into 1.2, but it'd be cool if it did. Mark the milestone accordingly. -- Ticket URL: <http://code.djangoproject.com/ticket/13240> 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 [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.
