* cc: someuniquename@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:18>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: piethon@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:19>
* cc: naczelnik-djangoproject@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:20>
Comment (by Dylan Young):
I'm a little confused as to why we don't just add an extra optional kwarg
to these methods to support custom through models (i.e. defaults for
add/create/set and lookups for remove).
Can someone clarify?
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:21>
Comment (by Collin Anderson):
proof of concept:
https://github.com/django/django/compare/master...collinanderson:ticket9475
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:22>
Comment (by Victor Porton):
Also by the course of fixing this bug we should eliminate error messages
for `ModelForm`s like:
> AttributeError: Cannot set values on a ManyToManyField which specifies
an intermediary model. Use post_app.PostInTimeline's Manager instead.
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:23>
* cc: Collin Anderson (added)
Comment:
Pull Request: https://github.com/django/django/pull/8981
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:24>
* needs_docs: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:25>
* cc: astandley (added)
* needs_tests: 0 => 1
Comment:
https://github.com/django/django/pull/8981 lacks tests for successful
add(), create(), etc for ManyToManyFields where extra fields are required
on the through model.
The required_through field is only tested for failure.
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:26>
* cc: Rich Rauenzahn (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:27>
* cc: Zach (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:28>
* needs_tests: 1 => 0
Comment:
I just rebased this patch, updated version numbers, and added fail and
success tests for add, create, set, get_or_create, and update_or_create.
https://github.com/django/django/pull/8981
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:29>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"769355c76531749d0bc0abad279402e361eaec4e" 769355c7]:
{{{
#!CommitTicketReference repository=""
revision="769355c76531749d0bc0abad279402e361eaec4e"
Fixed #9475 -- Allowed RelatedManager.add(), create(), etc. for m2m with a
through model.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:30>
Comment (by Tim Graham <timograham@…>):
In [changeset:"d212bc03bac1bce074207074a45032bb6bfdf3ec" d212bc0]:
{{{
#!CommitTicketReference repository=""
revision="d212bc03bac1bce074207074a45032bb6bfdf3ec"
Refs #9475 -- Fixed typo, used unpacking generalization, and made
through_defaults kwarg-only.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:31>
Comment (by Tim Graham <timograham@…>):
In [changeset:"dbcf2ffa77af24642c035c58199e6058d91d8e35" dbcf2ff]:
{{{
#!CommitTicketReference repository=""
revision="dbcf2ffa77af24642c035c58199e6058d91d8e35"
Refs #9475 -- Simplified dictionary unpacking.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:32>
Comment (by GitHub <noreply@…>):
In [changeset:"284bde3fbe07485d64289e28014a4eada68aef91" 284bde3f]:
{{{
#!CommitTicketReference repository=""
revision="284bde3fbe07485d64289e28014a4eada68aef91"
Refs #9475 -- Linked through_default docs to related managers methods.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:33>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"8aedad6909becf0a8f62428eb208ad45bd2d363f" 8aedad69]:
{{{
#!CommitTicketReference repository=""
revision="8aedad6909becf0a8f62428eb208ad45bd2d363f"
[3.1.x] Refs #9475 -- Linked through_default docs to related managers
methods.
Backport of 284bde3fbe07485d64289e28014a4eada68aef91 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/9475#comment:34>