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. --- docs/topics/db/examples/many_to_many.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/topics/db') diff --git a/docs/topics/db/examples/many_to_many.txt b/docs/topics/db/examples/many_to_many.txt index 53926d13fe..ed4a093964 100644 --- a/docs/topics/db/examples/many_to_many.txt +++ b/docs/topics/db/examples/many_to_many.txt @@ -17,22 +17,22 @@ objects, and a ``Publication`` has multiple ``Article`` objects: class Publication(models.Model): title = models.CharField(max_length=30) - def __str__(self): - return self.title - class Meta: ordering = ('title',) + def __str__(self): + return self.title + class Article(models.Model): headline = models.CharField(max_length=100) publications = models.ManyToManyField(Publication) - def __str__(self): - return self.headline - class Meta: ordering = ('headline',) + def __str__(self): + return self.headline + What follows are examples of operations that can be performed using the Python API facilities. Note that if you are using :ref:`an intermediate model ` for a many-to-many relationship, some of the related -- cgit v1.3