web/facet.py
changeset 10597 44c52385d2d8
parent 10495 5bd914ebf3ae
child 10612 84468b90e9c1
equal deleted inserted replaced
10596:3a7ce5c9fe35 10597:44c52385d2d8
   920         else:
   920         else:
   921             _ = unicode
   921             _ = unicode
   922         if self.rql_sort:
   922         if self.rql_sort:
   923             return [(_(value), value) for value, in rset]
   923             return [(_(value), value) for value, in rset]
   924         values = [(_(value), value) for value, in rset]
   924         values = [(_(value), value) for value, in rset]
   925         if self.sortasc:
   925         return sorted(values, reverse=not self.sortasc)
   926             return sorted(values)
       
   927         return reversed(sorted(values))
       
   928 
   926 
   929 
   927 
   930 class AttributeFacet(RelationAttributeFacet):
   928 class AttributeFacet(RelationAttributeFacet):
   931     """Base facet to filter some entities according one of their attribute.
   929     """Base facet to filter some entities according one of their attribute.
   932     Configuration is mostly similarly as :class:`RelationAttributeFacet`, except that:
   930     Configuration is mostly similarly as :class:`RelationAttributeFacet`, except that: