Skip to contentSkip to conversation

toaster: tables Set a default order for the software recipes table

PATCH New Michael Wood 1 participant 1 message Dec 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toaster: tables Set a default order for the software recipes table

From: Belen Barros Pena <[email protected]>

Add default order by recipe name, so that the table content is sorted when the page loads.

[YOCTO #8791]

---
 lib/toaster/toastergui/tables.py | 1 +
 1 file changed, 1 insertion(+)
lib/toaster/toastergui/tables.py +1 -0
index 74af507..3808820 100644
@@ -561,6 +561,7 @@ class SoftwareRecipesTable(RecipesTable):
     def __init__(self, *args, **kwargs):
         super(SoftwareRecipesTable, self).__init__(*args, **kwargs)
         self.title = "Compatible software recipes"
+        self.default_orderby = "name"
 
     def setup_queryset(self, *args, **kwargs):
         super(SoftwareRecipesTable, self).setup_queryset(*args, **kwargs)
Signature · 1 line
2.5.0