aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--layerindex/context_processors.py2
-rw-r--r--layerindex/models.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/layerindex/context_processors.py b/layerindex/context_processors.py
index 90fc0f8bbc..44f1f80141 100644
--- a/layerindex/context_processors.py
+++ b/layerindex/context_processors.py
@@ -11,7 +11,7 @@ def layerindex_context(request):
if not current_branch:
current_branch = 'master'
return {
- 'all_branches': Branch.objects.all(),
+ 'all_branches': Branch.objects.all().order_by('sort_priority'),
'current_branch': current_branch,
'unpublished_count': LayerItem.objects.filter(status='N').count(),
} \ No newline at end of file
diff --git a/layerindex/models.py b/layerindex/models.py
index b581d8dd38..35febf1a2d 100644
--- a/layerindex/models.py
+++ b/layerindex/models.py
@@ -15,6 +15,7 @@ class Branch(models.Model):
name = models.CharField(max_length=50)
bitbake_branch = models.CharField(max_length=50)
short_description = models.CharField(max_length=50, blank=True)
+ sort_priority = models.IntegerField(blank=True, null=True)
class Meta:
verbose_name_plural = "Branches"