summaryrefslogtreecommitdiff
path: root/tests/custom_columns/models.py
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2022-02-03 20:24:19 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-07 20:37:05 +0100
commit9c19aff7c7561e3a82978a272ecdaad40dda5c00 (patch)
treef0506b668a013d0063e5fba3dbf4863b466713ba /tests/custom_columns/models.py
parentf68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff)
Refs #33476 -- Reformatted code with Black.
Diffstat (limited to 'tests/custom_columns/models.py')
-rw-r--r--tests/custom_columns/models.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/custom_columns/models.py b/tests/custom_columns/models.py
index 575ca99a18..378a001820 100644
--- a/tests/custom_columns/models.py
+++ b/tests/custom_columns/models.py
@@ -19,32 +19,32 @@ from django.db import models
class Author(models.Model):
- Author_ID = models.AutoField(primary_key=True, db_column='Author ID')
- first_name = models.CharField(max_length=30, db_column='firstname')
- last_name = models.CharField(max_length=30, db_column='last')
+ Author_ID = models.AutoField(primary_key=True, db_column="Author ID")
+ first_name = models.CharField(max_length=30, db_column="firstname")
+ last_name = models.CharField(max_length=30, db_column="last")
class Meta:
- db_table = 'my_author_table'
- ordering = ('last_name', 'first_name')
+ db_table = "my_author_table"
+ ordering = ("last_name", "first_name")
def __str__(self):
- return '%s %s' % (self.first_name, self.last_name)
+ return "%s %s" % (self.first_name, self.last_name)
class Article(models.Model):
- Article_ID = models.AutoField(primary_key=True, db_column='Article ID')
+ Article_ID = models.AutoField(primary_key=True, db_column="Article ID")
headline = models.CharField(max_length=100)
- authors = models.ManyToManyField(Author, db_table='my_m2m_table')
+ authors = models.ManyToManyField(Author, db_table="my_m2m_table")
primary_author = models.ForeignKey(
Author,
models.SET_NULL,
- db_column='Author ID',
- related_name='primary_set',
+ db_column="Author ID",
+ related_name="primary_set",
null=True,
)
class Meta:
- ordering = ('headline',)
+ ordering = ("headline",)
def __str__(self):
return self.headline