add priority and alias models to School model, change default sort to use priority
authorSeth Woodworth <seth@sethish.com>
Wed, 26 Jun 2013 16:57:13 +0000 (12:57 -0400)
committerSeth Woodworth <seth@sethish.com>
Wed, 26 Jun 2013 16:57:13 +0000 (12:57 -0400)
karmaworld/apps/courses/models.py

index 58fa6a3bc4e90d077f7f85441cad20661b499407..0c70727c0444588cd2dcde7ace3d7d4f4a717d3d 100644 (file)
@@ -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):