id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux
6604,Custom sort of QuerySet() as list,Alexander Nesterov ,nobody,"In my table I have values like: 'test1', 'test2', 'test111' and so on, and need to sort them. ORDER BY statement sorts them ""wrongly"" as strings:
'test2' > 'test4' - false but 'test4' > 'test12' - true.
I can sort this values manually, using list and custom cmp function, but in this situation my sort function will return list instead of QuerySet object, that I need for my ModelChoiceField.
Is there any way to sort QuerySet items as list? (list.sort(cmp=...))
Thanks.
",,closed,"Database layer (models, ORM)",master,,fixed,"queryset, sort",,Unreviewed,0,0,0,0,,