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:
140d537
)
add priority and alias models to School model, change default sort to use priority
author
Seth Woodworth
<seth@sethish.com>
Wed, 26 Jun 2013 16:57:13 +0000
(12:57 -0400)
committer
Seth Woodworth
<seth@sethish.com>
Wed, 26 Jun 2013 16:57:13 +0000
(12:57 -0400)
karmaworld/apps/courses/models.py
patch
|
blob
|
history
diff --git
a/karmaworld/apps/courses/models.py
b/karmaworld/apps/courses/models.py
index 58fa6a3bc4e90d077f7f85441cad20661b499407..0c70727c0444588cd2dcde7ace3d7d4f4a717d3d 100644
(file)
--- a/
karmaworld/apps/courses/models.py
+++ b/
karmaworld/apps/courses/models.py
@@
-24,10
+24,12
@@
class School(models.Model):
# United States Department of Education institution_id
usde_id = models.BigIntegerField(blank=True, null=True)
file_count = models.IntegerField(default=0)
+ priority = models.BooleanField(default=0)
+ alias = models.CharField(max_length=255, null=True, blank=True)
class Meta:
""" Sort School by file_count descending, name abc=> """
- ordering = ['-file_count', 'name']
+ ordering = ['-file_count',
'-priority',
'name']
def __unicode__(self):