summaryrefslogtreecommitdiff
path: root/tests/m2o_recursive/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/m2o_recursive/models.py')
-rw-r--r--tests/m2o_recursive/models.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/m2o_recursive/models.py b/tests/m2o_recursive/models.py
index bb73589800..af23588456 100644
--- a/tests/m2o_recursive/models.py
+++ b/tests/m2o_recursive/models.py
@@ -15,7 +15,9 @@ from django.db import models
class Category(models.Model):
name = models.CharField(max_length=20)
- parent = models.ForeignKey('self', models.SET_NULL, blank=True, null=True, related_name='child_set')
+ parent = models.ForeignKey(
+ "self", models.SET_NULL, blank=True, null=True, related_name="child_set"
+ )
def __str__(self):
return self.name
@@ -23,8 +25,12 @@ class Category(models.Model):
class Person(models.Model):
full_name = models.CharField(max_length=20)
- mother = models.ForeignKey('self', models.SET_NULL, null=True, related_name='mothers_child_set')
- father = models.ForeignKey('self', models.SET_NULL, null=True, related_name='fathers_child_set')
+ mother = models.ForeignKey(
+ "self", models.SET_NULL, null=True, related_name="mothers_child_set"
+ )
+ father = models.ForeignKey(
+ "self", models.SET_NULL, null=True, related_name="fathers_child_set"
+ )
def __str__(self):
return self.full_name