mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Followed style guide for model attribute ordering.
This commit is contained in:
@@ -17,12 +17,12 @@ class Article(models.Model):
|
||||
title = models.CharField(max_length=150)
|
||||
author = models.ForeignKey(Author, models.SET_NULL, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return 'Article titled: %s' % self.title
|
||||
|
||||
class Meta:
|
||||
ordering = ['author__name']
|
||||
|
||||
def __str__(self):
|
||||
return 'Article titled: %s' % self.title
|
||||
|
||||
|
||||
# These following 4 models represent a far more complex ordering case.
|
||||
class SystemInfo(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user