Changes between Initial Version and Version 2 of Ticket #25027
- Timestamp:
- Jun 26, 2015, 6:35:11 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25027
- Property Cc added
-
Ticket #25027 – Description
initial v2 5 5 6 6 class Course(models.Model): 7 participants = models.ManyToManyField(UserProfile, related_name=' foo')7 participants = models.ManyToManyField(UserProfile, related_name='+') 8 8 9 9 class Document(models.Model): 10 last_modified_user = models.ForeignKey(UserProfile, related_name=' foo')10 last_modified_user = models.ForeignKey(UserProfile, related_name='+') 11 11 }}} 12 12 … … 31 31 changing the related name in one of the models to something else fixes this. 32 32 33 i would have expected to get some warning that i'm using the same related name on the same model. especially i expected this to not break when i'm not even using the related name in the test. 34 35 this also breaks when using '+' as related name. in this case, i would expect everything to just work. 33 if using a related name other than '+', the test still fails as before and the check command does not complain either, but at least makemigrations will spot the mistake.