id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 15932 related_name='+' ignored in ManyToManyField validation Fredde nobody "According to the documentation (http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.related_name) setting related_name='+' to any relation field should prevent django from creating a related field. This also seems to be the case in the ''contribute_to_related_class'' functions. However the validation of ManyToMany fields ignors this and gives an error message anyway. To reproduce: {{{ #!python class A(models.Model): pass class B(models.Model): # This works fk1 = models.ForeignKey(A, related_name = '+') fk2 = models.ForeignKey(A, related_name = '+') # This gives a ""Accessor for m2m field 'm2m1' clashes with related m2m field 'A.+'"" error m2m1 = models.ManyToManyField(A, related_name = '+') m2m2 = models.ManyToManyField(A, related_name = '+') }}} The attached patch will make the validator check f.rel.is_hidden() before doing any further validation of related field names. " Bug closed Documentation 1.4-beta-1 Normal fixed fredrik.kers@… jann@… sean@… Accepted 1 0 0 0 0 0