From aaad3e27ac7cfcbbfeac6353d17d27e8da523cc8 Mon Sep 17 00:00:00 2001 From: Akis Kesoglou Date: Fri, 7 Mar 2014 13:56:28 +0200 Subject: Fixed #22217 - ManyToManyField.through_fields fixes. - Docs description of arguments mix up. - Keep it from erroneously masking E332 check. - Add checks E338 and E339, tweak message of E337. --- docs/topics/db/models.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/topics/db') diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt index 4caf9ad736..d5a700f62e 100644 --- a/docs/topics/db/models.txt +++ b/docs/topics/db/models.txt @@ -440,12 +440,12 @@ explicit declaration defines how the two models are related. There are a few restrictions on the intermediate model: * Your intermediate model must contain one - and *only* one - foreign key - to the target model (this would be ``Person`` in our example), or you must + to the source model (this would be ``Group`` in our example), or you must explicitly specify the foreign keys Django should use for the relationship using :attr:`ManyToManyField.through_fields `. If you have more than one foreign key and ``through_fields`` is not specified, a validation error will be raised. A similar restriction applies - to the foreign key to the source model (this would be ``Group`` in our + to the foreign key to the target model (this would be ``Person`` in our example). * For a model which has a many-to-many relationship to itself through an -- cgit v1.3