diff options
author | Matt Wiens <mwiens91@gmail.com> | 2018-12-27 16:34:14 -0800 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-12-27 19:34:14 -0500 |
commit | e817ae74da0e515db31907ebcb2d00bcf7c3f5bc (patch) | |
tree | 95a250a4d845b9c8f4f8416fc8962cfe1937951e /tests/custom_columns | |
parent | dd8ed64113947ed066b83e443053e389e8f77ebc (diff) | |
download | django-e817ae74da0e515db31907ebcb2d00bcf7c3f5bc.tar.gz |
Followed style guide for model attribute ordering.
Diffstat (limited to 'tests/custom_columns')
-rw-r--r-- | tests/custom_columns/models.py | 12 |
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 |