Improve deck card sorting

This commit is contained in:
Correl Roush 2010-09-23 00:02:46 -04:00
parent 22a9beff50
commit db6cf9ab68

View file

@ -32,7 +32,7 @@ class Deck(models.Model):
def __unicode__(self):
return self.name
def get_cards(self):
return self.included_set.all().order_by('card__type__name')
return self.included_set.all().order_by('card__type__name', 'card__name')
def card_count(self):
return sum([i.count for i in self.included_set.all()])
def lands(self):