    explicitly specify the foreign keys Django should use for the relationship
    using :attr:`ManyToManyField.through_fields <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
    example).
  
  * For a model which has a many-to-many relationship to itself through an
    intermediary model, two foreign keys to the same model are permitted, but
    they will be treated as the two (different) sides of the many-to-many
 
</s> remove   to the target model (this would be ``Person`` in our example), or you must
 </s> add   to the source model (this would be ``Group`` in our example), or you must </s> remove * **fields.E337**: The field is given an iterable for through_fields, which does not provide the names for both link fields that Django should use for the relation through <model>.
 </s> add * **fields.E337**: Field specifies ``through_fields`` but does not provide the names of the two link fields that should be used for the relation through ``<model>``.
* **fields.E338**: The intermediary model ``<through model>`` has no field ``<field name>``.
* **fields.E339**: ``<model>.<field name>`` is not a foreign key to ``<model>``. </s> remove     ``field1`` is the name of the foreign key to the target model (``person``
    in this case), and ``field2`` the name of the foreign key to the model the
    :class:`ManyToManyField` is defined on (``group`` in this case).
 </s> add     ``field1`` is the name of the foreign key to the model the
    :class:`ManyToManyField` is defined on (``group`` in this case), and
    ``field2`` the name of the foreign key to the target model (``person``
    in this case). </s> remove                 ("The field is given an iterable for through_fields, "
                 "which does not provide the names for both link fields "
                 "that Django should use for the relation through model "
                 "'invalid_models_tests.Invitation'."),
                hint=None,
 </s> add                 ("Field specifies 'through_fields' but does not provide the names "
                 "of the two link fields that should be used for the relation "
                 "through model 'invalid_models_tests.Invitation'."),
                hint=("Make sure you specify 'through_fields' as "
                      "through_fields=('field1', 'field2')"), </s> remove         with self.assertRaisesMessage(FieldDoesNotExist, 'invalid_field'):
            Event().invitees.all()
 </s> add         field = Event._meta.get_field('invitees')
        errors = field.check(from_model=Event)
        expected = [
            Error(
                ("'Invitation.invitee' is not a foreign key to 'Event'."),
                hint="Did you mean one of the following foreign keys to 'Event': event?",
                obj=field,
                id='fields.E339'),
            Error(
                ("'Invitation.event' is not a foreign key to 'Fan'."),
                hint="Did you mean one of the following foreign keys to 'Fan': invitee, inviter?",
                obj=field,
                id='fields.E339'),
        ]
        self.assertEqual(expected, errors)
  to the foreign key to the target model (this would be ``Person`` in our
    explicitly specify the foreign keys Django should use for the relationship
    using :attr:`ManyToManyField.through_fields <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 target model (this would be ``Person`` in our
    example).
  
  * For a model which has a many-to-many relationship to itself through an
    intermediary model, two foreign keys to the same model are permitted, but
    they will be treated as the two (different) sides of the many-to-many
keep keep keep keep replace keep keep keep keep keep
 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