i'm trying to figure out how to implement sorting into the DataGrid using
MongoDB with ming.
Basically i took the example in the DataGrid documentation and tried to
change it for Ming.
ordering = kw.get('ordercol')
if ordering and ordering == '+':
places = places.sort(ordering[1:], ming.DESCENDING) # Descending
elif ordering and ordering == '-':
places = places.sort(ordering[1:], ming.ASCENDING) # Ascending
But for some reason it doesn't work. It crashes with the following error
TypeError: must use keyword argument for key function
I also tried to enter the keyword instead of "ordering[1:]", but i get the
same error. Any idea what's wrong?
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.