1
0
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:
Matt Wiens
2018-12-27 16:34:14 -08:00
committed by Tim Graham
parent dd8ed64113
commit e817ae74da
27 changed files with 148 additions and 135 deletions

View File

@@ -41,9 +41,6 @@ class Article(models.Model):
response_to = models.ForeignKey('self', models.SET_NULL, null=True)
unmanaged_reporters = models.ManyToManyField(Reporter, through='ArticleReporter', related_name='+')
def __str__(self):
return self.headline
class Meta:
ordering = ('headline',)
index_together = [
@@ -51,6 +48,9 @@ class Article(models.Model):
['headline', 'response_to', 'pub_date', 'reporter'],
]
def __str__(self):
return self.headline
class ArticleReporter(models.Model):
article = models.ForeignKey(Article, models.CASCADE)