Omitting "Field" on ManyToManyField should throw an error
|Reported by:||pa-ching||Owned by:||Adrian Holovaty|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If I write something like
class Post(models.Model): tags = models.ManyToMany(Tag)
instead of models.ManyToManyField, Django doesn't complain at all. However, any attempts to access (for example) tag_instance.post_set report that there is no such field, and there are probably other things that don't work. This is mainly due to my typing errors, but I've been bitten by this misspelling several times. I guess that I personally forget the Field suffix because ForeignKey doesn't have one. It isn't too big of a deal, but it might be nice for newbies like myself, and Django's error reporting has always been very helpful, either way. Thanks!