Fixed #21375 -- related_name='+' clashed with other '+' names

This commit is contained in:
Anssi Kääriäinen 2013-11-02 21:16:33 +02:00
parent 18c642b96c
commit 9f76ea1eaa
3 changed files with 24 additions and 1 deletions

View file

@ -25,3 +25,24 @@ class ThingWithIterableChoices(models.Model):
# Testing choices= Iterable of Iterables
# See: https://code.djangoproject.com/ticket/20430
thing = models.CharField(max_length=100, blank=True, choices=Things())
class Meta:
# Models created as unmanaged as these aren't ever queried
managed = False
class ManyToManyRel(models.Model):
thing1 = models.ManyToManyField(ThingWithIterableChoices, related_name='+')
thing2 = models.ManyToManyField(ThingWithIterableChoices, related_name='+')
class Meta:
# Models created as unmanaged as these aren't ever queried
managed = False
class FKRel(models.Model):
thing1 = models.ForeignKey(ThingWithIterableChoices, related_name='+')
thing2 = models.ForeignKey(ThingWithIterableChoices, related_name='+')
class Meta:
# Models created as unmanaged as these aren't ever queried
managed = False