db.collecionname.find().sort("UserName",pymongo.ASCENDING) --升序db.collecionname.find().sort("UserName",pymongo.DESCENDING) --降序