Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-10-26 Thread David Foster
on the umbrella Trac ticket: https://code.djangoproject.com/ticket/30828 Cheers, David Foster | Seattle, WA, USA On Sunday, October 13, 2019 at 3:39:12 PM UTC-7, David Foster wrote: > > Here's the link to the PR for review: > https://github.com/django/django/pull/11899 > > (Apol

Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-10-13 Thread David Foster
Here's the link to the PR for review: https://github.com/django/django/pull/11899 (Apologies for the double-post) - David On Sunday, October 13, 2019 at 3:37:07 PM UTC-7, David Foster wrote: > > I've created a PR which is waiting for review, if someone has time. > > According to Tr

Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-10-13 Thread David Foster
tch-review-checklist> and either mark the ticket as "Ready for checkin" if everything looks good, or leave comments for improvement and mark the ticket as "Patch needs improvement". Thanks for any help. - David On Tuesday, October 1, 2019 at 11:06:15 PM UTC-7, David Fos

Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-10-02 Thread David Foster
> creating/modifying the through model in bulk. Having a method that does > this would be good IMO. > > Unless anyone has strong opinions against this then can you make a ticket? > > Tom > > On 30 Sep 2019, at 02:14, David Foster > > wrote: > >  > He

Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-09-29 Thread David Foster
a special function import. For bulk_disassociate() the analogous API would be: M1.m2_set.remove_pairs(*[(m1, m2), ...]) # --- OR --- M1.m2_set.remove_pair_ids(*[(m1_id, m2_id), ...]) - David On Thursday, September 26, 2019 at 10:45:45 AM UTC-7, David Foster wrote: > > Given the following e

Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-09-26 Thread David Foster
Errata: The proposed default value for assert_no_collisions is False rather than True, for safety. On Thursday, September 26, 2019 at 10:45:45 AM UTC-7, David Foster wrote: > > Given the following example model: > > class M1(models.Model): > m2_set = models.Many

Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-09-26 Thread David Foster
Given the following example model: class M1(models.Model): m2_set = models.ManyToManyField('M2') It is already possible to associate *one* M1 with *many* M2s with a single DB query: m1.m2_set.add(*m2s) However it's more difficult to associate *many* M1s with *many* M2s, particularly if

Improving usefulness of management command help output via reordering options

2018-04-05 Thread David Foster
Raise on CommandError exceptions --no-colorDon't colorize the command output. Thoughts? -- David Foster | Seattle, WA, USA -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To uns

Adding a tutorial for Channels

2018-02-05 Thread David Foster
This weekend I spent several hours getting Channels configured to run a simple chat server . This was an experiment I wanted to do before trying to integrate Channels into a much larger project. It would have taken me a lot less time if there