Sort pictograms vocabulary
authorThierry Florac <thierry.florac@onf.fr>
Fri, 13 Jul 2018 09:52:53 +0200
changeset 847 1f64d5edff11
parent 846 0ad0f419d6fc
child 848 a7cfc19b1b1b
Sort pictograms vocabulary
src/pyams_content/reference/pictograms/manager.py
--- a/src/pyams_content/reference/pictograms/manager.py	Fri Jul 13 09:49:53 2018 +0200
+++ b/src/pyams_content/reference/pictograms/manager.py	Fri Jul 13 09:52:53 2018 +0200
@@ -66,4 +66,5 @@
                 terms = [SimpleTerm(v.__name__,
                                     title=II18n(v).query_attribute('title', request=request))
                          for v in table.values()]
+            terms = sorted(terms, key=lambda x: x.title)
         super(SelectedPictogramsVocabulary, self).__init__(terms)