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/admin_docs/models.py | |
| parent | f68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff) | |
Refs #33476 -- Reformatted code with Black.
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): |
