Re: Order SelectField items

2007-01-04 Thread bahund
I solved this by sorting the tuple of tuples outside of the add/create custom manipulators, then using that sorted list instead of ColorAccount.COLORS: col_list = list(ColorAccount.COLORS) col_list.sort(lambda x, y: cmp(x[1], y[1])) col_tuple = tuple(col_list) And then: forms.Selec

Order SelectField items

2007-01-04 Thread bahund
Hello, This is a simplified example of what I'm trying to accomplish. In my model I have the following objects and fields: class ColorAccount(models.Model): COLORS = ( (0, 'Red'), (1, 'Orange'), (2, 'Yellow'), (3, 'Green'), ... ) fav_color = mode

Order SelectField items

2007-01-04 Thread bahund
Hello, This is a simplified example of what I'm trying to accomplish. In my model I have the following objects and fields: class ColorAccount(models.Model): WINE_VARIETALS = ( (0, 'Red'), (1, 'Orange'), (2, 'Yellow'), (3, 'Green'), ... ) fav_colo