diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2013-11-02 21:16:33 +0200 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2013-11-02 21:18:35 +0200 |
| commit | 9f76ea1eaad0db0183fa3b5bade16392db0cafbd (patch) | |
| tree | 4342e8d48db5b9a4b240f8c9c71e87924ba05a77 /tests/model_validation/models.py | |
| parent | 18c642b96c5160d13971f7699a43d0f672435b26 (diff) | |
Fixed #21375 -- related_name='+' clashed with other '+' names
Diffstat (limited to 'tests/model_validation/models.py')
| -rw-r--r-- | tests/model_validation/models.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/model_validation/models.py b/tests/model_validation/models.py index 9a2a5f7cd0..d2e77cbccc 100644 --- a/tests/model_validation/models.py +++ b/tests/model_validation/models.py @@ -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 |
