mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #21375 -- related_name='+' clashed with other '+' names
This commit is contained in:
parent
18c642b96c
commit
9f76ea1eaa
3 changed files with 24 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue