Edit: Solved using key=lambda and learning what I'm actually doing.
With gemodel like
class A(GeoModel,search.SearchableModel):
I'm trying to order by date using db.GeoPt to store google maps coordinates with GAE and geomodel I can map and match. But order("- modified") is not working. There is no trace. All ideas are welcome. The code that should sort is
a = A.proximity_fetch(A.all().filter("modified >",
timeline).filter("published =", True).filter("modified <=",
bookmark ).order("-modified") ,db.GeoPt(lat, lon),max_results=PAGESIZE
+1, max_distance=m)
All parameters appear to work except order("-modified")
Trying the suggested way sorting with lambda I get message "TypeError: lambda() takes exactly 1 argument (2 given)"
a = A.proximity_fetch(A.all().filter("modified >", timeline).filter("published =", True).filter("modified <=", bookmark ).order("-modified") ,db.GeoPt(lat, lon),max_results=40, max_distance=m)
a = sorted(a, lambda x: x.modified, reverse=True)