I'm trying to do a simple template where I pass my data from BigTable
to a template.
I'm using what I hope is a plain-Vanilla template as described in the
book "Developing with Google App Engine". I was able to get a very
simple template to work just passing one variable and having it show
on the screen. Now I am trying to use a template that shows all rows
of a table. I only have one row stored in my database at this time.
The error is: TypeError: has_key() takes exactly 1 argument (2 given)
This is my code that is trying to show the template:
class Report(webapp.RequestHandler):
def renderPage(self, fileName, values):
path = os.path.join(os.path.dirname(__file__),fileName)
self.response.out.write(template.render(path, values))
def get(self):
query = db.GqlQuery("Select * from TaskLog")
TaskLogs= query.get();
self.renderPage('templates/list.html', TaskLogs)
My data/model is defined as follows:
class TaskLog(db.Model):
customerDomain = db.StringProperty()
workerEmail = db.StringProperty() # db.UserProperty()
taskCode = db.StringProperty()
eventStartedDateTime = db.DateTimeProperty(auto_now=False)
eventCompletedDateTime = db.DateTimeProperty(auto_now=False)
resultFlag = db.IntegerProperty()
issues = db.StringProperty(required=False)
My Imports:
import os
import cgi
import datetime
import wsgiref.handlers
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.ext.webapp.util import run_wsgi_app
I found these related items, but I have no idea what the solution or
get-around is.
Issue/Bug:
http://code.google.com/p/googleappengine/issues/detail?id=898&q=has_key&colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component
http://groups.google.com/group/google-appengine/browse_thread/thread/8c1721fc941d4cbd/66ef6147b112af66?lnk=gst&q=cheetah#66ef6147b112af66
http://dotnetmafia.com/blogs/jamesashley/archive/2009/02/08/837.aspx
Any ideas appreciated.
Thanks,
Neal Walters
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---