[google-appengine] Re: HELP A GQL exception "AttributeError: 'GqlQuery' object has no attribute 'has_key'"

2008-12-27 Thread Alexander Kojevnikov
You need to fetch() your entities, you cannot just pass the query object to the template. Also, template.render() expects a dictionary as its second argument. Try this code: def get(self): query = db.GqlQuery("SELECT * FROM Lists ORDER BY date") lists = query.fetch(10) path = os.p

[google-appengine] Re: HELP A GQL exception "AttributeError: 'GqlQuery' object has no attribute 'has_key'"

2008-12-27 Thread Pikaurd Chen
There is my code. Thx # --> model define class Lists(db.Model): type = db.IntegerProperty() money = db.IntegerProperty() remark = db.StringProperty(multiline=True) date = db.DateTimeProperty(auto_now_add=True) #TestHandler define class TestHandler(webapp.RequestHandler): def get(se

[google-appengine] Re: HELP A GQL exception "AttributeError: 'GqlQuery' object has no attribute 'has_key'"

2008-12-27 Thread Alexander Kojevnikov
Could you post here your code (both the querying part and the model definition)? On Dec 28, 2:59 am, Pikaurd wrote: > Hi guys. I got a error "AttributeError: 'GqlQuery' object has no > attribute 'has_key'" when I executing the GQL and my statement is > "SELECT * FROM Lists ORDER BY date LIMIT 10