From: richard Date: Mon, 16 Sep 2002 06:51:13 +0000 (+0000) Subject: *cough* sort list results *cough* X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4fa1ad289d723668322b96f084fc7a88e1c9c310;p=roundup.git *cough* sort list results *cough* git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1179 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index a42ae90..2561b2b 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -323,7 +323,13 @@ class HTMLClass(HTMLPermissions): klass = HTMLUser else: klass = HTMLItem - l = [klass(self._client, self.classname, x) for x in self._klass.list()] + + # get the list and sort it nicely + l = self._klass.list() + sortfunc = make_sort_function(self._db, self._prop.classname) + l.sort(sortfunc) + + l = [klass(self._client, self.classname, x) for x in l] return l def csv(self):