projects
/
oweals
/
karmaworld.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a3395e
)
set default sort order for schools (file_count descending)
author
Seth Woodworth
<seth@sethish.com>
Fri, 25 Jan 2013 21:51:59 +0000
(16:51 -0500)
committer
Seth Woodworth
<seth@sethish.com>
Fri, 25 Jan 2013 21:51:59 +0000
(16:51 -0500)
karmaworld/apps/courses/models.py
patch
|
blob
|
history
diff --git
a/karmaworld/apps/courses/models.py
b/karmaworld/apps/courses/models.py
index 8ac6b1be94c1b6fdd68e4a6099c73cd0b4b25326..000394ae2b3e5d47fec86e9c8e7e9f11d156d163 100644
(file)
--- a/
karmaworld/apps/courses/models.py
+++ b/
karmaworld/apps/courses/models.py
@@
-23,6
+23,10
@@
class School(models.Model):
facebook_id = models.BigIntegerField(blank=True, null=True)
file_count = models.IntegerField(default=0)
+ class Meta:
+ """ Sort School by file_count descending, name abc=> """
+ ordering = ['-file_count', 'name']
+
def __unicode__(self):
return self.name