diff options
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 |
