diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-03-06 22:56:31 +0000 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-03-06 22:56:31 +0000 |
commit | af499c0d99b50717c8c599cff5ee4706baaef16a (patch) | |
tree | 2a4bbb06885e5372776c6fdb9abb12a2fd19461f /layerindex/context_processors.py | |
parent | f6fb84db4bacaa91995abb8655c0905a558614c6 (diff) | |
download | openembedded-core-contrib-af499c0d99b50717c8c599cff5ee4706baaef16a.tar.gz |
Add sort priority field to branch model
This enables sorting the branch drop-down in a configurable manner (e.g.
so that you can have them in order from newest to oldest).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/context_processors.py')
-rw-r--r-- | layerindex/context_processors.py | 2 |
1 files changed, 1 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 |