I want to get newest posts first, and try the following:
db.posts.find({"date": {"$lt": tomorrow, "$gte":
today}}).sort({'date':pymongo.DESCENDING})
(without sort, I get the oldest posts first fine)
I am getting this error
TypeError: if no direction is specified, key_or_list must be an instance of list
What is going on here? Is not it possible to sort by date?