diff options
| author | django-bot <ops@djangoproject.com> | 2022-02-03 20:24:19 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-07 20:37:05 +0100 |
| commit | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 (patch) | |
| tree | f0506b668a013d0063e5fba3dbf4863b466713ba /tests/distinct_on_fields/models.py | |
| parent | f68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff) | |
Refs #33476 -- Reformatted code with Black.
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 |
