Opened 4 years ago
Last modified 4 years ago
#32294 closed Bug
related_name='+' doesn't work for ManyToMany fields — at Version 1
Reported by: | Aleksey Ruban | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 3.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
Django raises an error during creation a db migration if two models with the same name refer to the same model in m2m field. related_name='+' or 'foo+' don't impact anything.
In some my project there are 50 apps and almost each one has a model with the same name. So I have to come up with a related name and write it in for each m2m field.
Just try to make a migration for my test project
https://github.com/rafick1983/django_related_name_bug
Note:
See TracTickets
for help on using tickets.