Re: Extending the checks for related-name clashes

2020-09-07 Thread Adam Johnson
> > I believe the technical term of this is "a mess". > Looks like it! I can't think of any reason why this inconsistency would be desirable. Adding more checks is normally fine since they can be disabled by users who want/rely on the behaviour. On Sun, 6 Sep 2020 at 13:54, Shai Berger wrote:

Re: Extending the checks for related-name clashes

2020-09-06 Thread Shai Berger
On Sun, 6 Sep 2020 12:01:34 +0100 Adam Johnson wrote: > I think it would be acceptable to make related name clashes a check > Error. I'm guessing you couldn't find any justification for why the > check doesn't currently do this? > I didn't find any, though I didn't look too hard. On the other

Re: Extending the checks for related-name clashes

2020-09-06 Thread Adam Johnson
I think it would be acceptable to make related name clashes a check Error. I'm guessing you couldn't find any justification for why the check doesn't currently do this? On Sun, 6 Sep 2020 at 11:31, Shai Berger wrote: > Hi all, > > When you define a related field on a model -- a ForeignKey etc

Extending the checks for related-name clashes

2020-09-06 Thread Shai Berger
Hi all, When you define a related field on a model -- a ForeignKey etc -- it usually adds its related-name as a backwards-accessor on the related model. These related names are checked for clashes against other fields and other related-names. But they are not checked for clashes against other