Skip to content

Commit

Permalink
get_latest_by & ordering defaults for abstract TimeStampedModel
Browse files Browse the repository at this point in the history
  • Loading branch information
tehfink committed Apr 22, 2011
1 parent 5632a00 commit 337a812
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django_extensions/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class TimeStampedModel(models.Model):
modified = ModificationDateTimeField(_('modified'))

class Meta:
get_latest_by = 'modified'
ordering = ('-modified', '-created',)
abstract = True


Expand Down

0 comments on commit 337a812

Please sign in to comment.