Skip to content

Commit 7ec40c7

Browse files
author
Richard Jones
committed
*cough* sort list results *cough*
1 parent ab089ae commit 7ec40c7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

roundup/cgi/templating.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,13 @@ def list(self):
323323
klass = HTMLUser
324324
else:
325325
klass = HTMLItem
326-
l = [klass(self._client, self.classname, x) for x in self._klass.list()]
326+
327+
# get the list and sort it nicely
328+
l = self._klass.list()
329+
sortfunc = make_sort_function(self._db, self._prop.classname)
330+
l.sort(sortfunc)
331+
332+
l = [klass(self._client, self.classname, x) for x in l]
327333
return l
328334

329335
def csv(self):

0 commit comments

Comments
 (0)