Changes between Initial Version and Version 2 of Ticket #25027


Ignore:
Timestamp:
Jun 26, 2015, 6:35:11 AM (9 years ago)
Author:
karyon
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25027

    • Property Cc karyon added
  • Ticket #25027 – Description

    initial v2  
    55
    66class Course(models.Model):
    7     participants = models.ManyToManyField(UserProfile, related_name='foo')
     7    participants = models.ManyToManyField(UserProfile, related_name='+')
    88
    99class Document(models.Model):
    10     last_modified_user = models.ForeignKey(UserProfile, related_name='foo')
     10    last_modified_user = models.ForeignKey(UserProfile, related_name='+')
    1111}}}
    1212
     
    3131changing the related name in one of the models to something else fixes this.
    3232
    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.
     33if 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.
Back to Top