diff options
| author | django-bot <ops@djangoproject.com> | 2022-02-08 12:09:55 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-08 12:15:38 +0100 |
| commit | 6a682b38e75d4c975b4c4493565a59f1bc14397c (patch) | |
| tree | 0bd9cda550bea26238656d9f120d769e8b41bb9e /tests/admin_docs/models.py | |
| parent | e73ce08888e6f34d3f050377cfd2fbb733be94a9 (diff) | |
[4.0.x] Refs #33476 -- Reformatted code with Black.
Backport of 9c19aff7c7561e3a82978a272ecdaad40dda5c00 from main.
Diffstat (limited to 'tests/admin_docs/models.py')
| -rw-r--r-- | tests/admin_docs/models.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/admin_docs/models.py b/tests/admin_docs/models.py index 06569d5c4c..7ae1ed8f95 100644 --- a/tests/admin_docs/models.py +++ b/tests/admin_docs/models.py @@ -36,10 +36,11 @@ class Person(models.Model): .. include:: admin_docs/evilfile.txt """ + first_name = models.CharField(max_length=200, help_text="The person's first name") last_name = models.CharField(max_length=200, help_text="The person's last name") company = models.ForeignKey(Company, models.CASCADE, help_text="place of work") - family = models.ForeignKey(Family, models.SET_NULL, related_name='+', null=True) + family = models.ForeignKey(Family, models.SET_NULL, related_name="+", null=True) groups = models.ManyToManyField(Group, help_text="has membership") def _get_full_name(self): @@ -55,13 +56,13 @@ class Person(models.Model): @property def a_property(self): - return 'a_property' + return "a_property" @cached_property def a_cached_property(self): - return 'a_cached_property' + return "a_cached_property" - def suffix_company_name(self, suffix='ltd'): + def suffix_company_name(self, suffix="ltd"): return self.company.name + suffix def add_image(self): |
