diff options
Diffstat (limited to 'tests/distinct_on_fields/models.py')
| -rw-r--r-- | tests/distinct_on_fields/models.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/distinct_on_fields/models.py b/tests/distinct_on_fields/models.py index 06c4f349c0..6fe7b55a92 100644 --- a/tests/distinct_on_fields/models.py +++ b/tests/distinct_on_fields/models.py @@ -4,15 +4,15 @@ from django.db import models class Tag(models.Model): name = models.CharField(max_length=10) parent = models.ForeignKey( - 'self', + "self", models.SET_NULL, blank=True, null=True, - related_name='children', + related_name="children", ) class Meta: - ordering = ['name'] + ordering = ["name"] def __str__(self): return self.name @@ -39,8 +39,8 @@ class Staff(models.Model): id = models.IntegerField(primary_key=True) name = models.CharField(max_length=50) organisation = models.CharField(max_length=100) - tags = models.ManyToManyField(Tag, through='StaffTag') - coworkers = models.ManyToManyField('self') + tags = models.ManyToManyField(Tag, through="StaffTag") + coworkers = models.ManyToManyField("self") def __str__(self): return self.name |
