From ddfc6c468a21689a4ce6682f8a611c87a5241178 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Sat, 18 Jun 2016 09:31:51 +0200 Subject: [PATCH] bijoe: order warehouses by name when displayed --- bijoe/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bijoe/views.py b/bijoe/views.py index 1c7cf7d..bd8fe0c 100644 --- a/bijoe/views.py +++ b/bijoe/views.py @@ -18,7 +18,7 @@ class HomepageView(TemplateView): def get_context_data(self, **kwargs): ctx = super(HomepageView, self).get_context_data(**kwargs) - ctx['warehouses'] = get_warehouses() + ctx['warehouses'] = sorted((Engine(w) for w in get_warehouses()), key=lambda w: w.label) return ctx