summaryrefslogtreecommitdiff
path: root/tests/custom_columns
diff options
context:
space:
mode:
authorMatt Wiens <mwiens91@gmail.com>2018-12-27 16:34:14 -0800
committerTim Graham <timograham@gmail.com>2018-12-27 19:34:14 -0500
commite817ae74da0e515db31907ebcb2d00bcf7c3f5bc (patch)
tree95a250a4d845b9c8f4f8416fc8962cfe1937951e /tests/custom_columns
parentdd8ed64113947ed066b83e443053e389e8f77ebc (diff)
downloaddjango-e817ae74da0e515db31907ebcb2d00bcf7c3f5bc.tar.gz
Followed style guide for model attribute ordering.
Diffstat (limited to 'tests/custom_columns')
-rw-r--r--tests/custom_columns/models.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/custom_columns/models.py b/tests/custom_columns/models.py
index 32d55af9f3..575ca99a18 100644
--- a/tests/custom_columns/models.py
+++ b/tests/custom_columns/models.py
@@ -23,13 +23,13 @@ class Author(models.Model):
first_name = models.CharField(max_length=30, db_column='firstname')
last_name = models.CharField(max_length=30, db_column='last')
- def __str__(self):
- return '%s %s' % (self.first_name, self.last_name)
-
class Meta:
db_table = 'my_author_table'
ordering = ('last_name', 'first_name')
+ def __str__(self):
+ return '%s %s' % (self.first_name, self.last_name)
+
class Article(models.Model):
Article_ID = models.AutoField(primary_key=True, db_column='Article ID')
@@ -43,8 +43,8 @@ class Article(models.Model):
null=True,
)
- def __str__(self):
- return self.headline
-
class Meta:
ordering = ('headline',)
+
+ def __str__(self):
+ return self.headline