Ticket #3164: basic_order_by.diff

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

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

  • tests/modeltests/basic/models.py

     
    99class Article(models.Model):
    1010    headline = models.CharField(maxlength=100, default='Default headline')
    1111    pub_date = models.DateTimeField()
    12 
     12    class Meta:
     13        ordering = ('pub_date',)
     14       
    1315    def __str__(self):
    1416        return self.headline
    1517
Back to Top