From e817ae74da0e515db31907ebcb2d00bcf7c3f5bc Mon Sep 17 00:00:00 2001 From: Matt Wiens Date: Thu, 27 Dec 2018 16:34:14 -0800 Subject: Followed style guide for model attribute ordering. --- tests/custom_columns/models.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/custom_columns') 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 -- cgit v1.3