Code

Ticket #3164: basic_order_by.diff

File basic_order_by.diff, 493 bytes (added by Matt Boersma <mboersma@…>, 7 years ago)

Adds ordering = ("pub_date",) to basic models.py

Line 
1Index: tests/modeltests/basic/models.py
2===================================================================
3--- tests/modeltests/basic/models.py    (revision 4226)
4+++ tests/modeltests/basic/models.py    (working copy)
5@@ -9,7 +9,9 @@
6 class Article(models.Model):
7     headline = models.CharField(maxlength=100, default='Default headline')
8     pub_date = models.DateTimeField()
9-
10+    class Meta:
11+        ordering = ('pub_date',)
12+       
13     def __str__(self):
14         return self.headline
15