Permalink
Browse files

Updated Category model to sort by position by default.

  • Loading branch information...
1 parent aebaad4 commit ca80883f9568e00680a2faf1a5e058da36d7c00b @lethain lethain committed Dec 28, 2008
Showing with 3 additions and 0 deletions.
  1. +3 −0 portfolio/models.py
View
@@ -36,6 +36,9 @@ class Category(models.Model):
slug = models.SlugField(max_length=50, unique=True)
position = models.PositiveIntegerField()
+ class Meta:
+ ordering = ["position"]
+
def __unicode__(self):
return self.name

0 comments on commit ca80883

Please sign in to comment.