Re: sorting a list of model instances

2008-11-07 Thread Thomas Guettler
Hi, > Although I would have to wonder why you're doing it this way, rather > than using the database to sort them? Since in my case it is easier. I need to filter out some item before. This calculation needs to be in python code. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/

Re: sorting a list of model instances

2008-11-07 Thread Daniel Roseman
On Nov 7, 1:54 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Hi, > > I just discovered, that you can't sort a list of model instances. > > This failed with AssertionError: > >         view_groups=sorted([brg.group for brg in ... ]) >         change_groups=sorted([...]) >         if

Re: sorting a list of model instances

2008-11-07 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-11-07, o godz. 14:54, przez Thomas Guettler: > I just discovered, that you can't sort a list of model instances. > > This failed with AssertionError: > >view_groups=sorted([brg.group for brg in ... ]) >change_groups=sorted([...]) >if

sorting a list of model instances

2008-11-07 Thread Thomas Guettler
Hi, I just discovered, that you can't sort a list of model instances. This failed with AssertionError: view_groups=sorted([brg.group for brg in ... ]) change_groups=sorted([...]) if view_groups==change_groups: ... else: assert