sqlalchemy natural sorting
Posted
by teggy
on Stack Overflow
See other posts from Stack Overflow
or by teggy
Published on 2010-05-19T07:59:39Z
Indexed on
2010/05/19
8:20 UTC
Read the original article
Hit count: 147
python
|sqlalchemy
Currently, i am querying with this code: meta.Session.query(Label).order_by(Label.name).all()
and it returns me objects sorted by Label.name in this manner ['1','7','1a','5c']. Is there a way i can have the objects returned in the order with their Label.name sorted like this ['1','1a','5c','7']
Thanks!
© Stack Overflow or respective owner