I'm using google app engine and I'm trying to insert a entity/table using the code:
class Tu(db.Model):
title = db.StringProperty(required=True)
presentation = db.TextProperty(required=True)
created = db.DateTimeProperty(auto_now_add=True)
last_modified = db.DateTimeProperty(auto_now=True)
. . .
a = Tu('teste', 'bla bla bla bla')
a.votes = 5
a.put()
but I get this error:
TypeError: Expected Model type; received teste (is str)
I'm following this doc https://developers.google.com/appengine/docs/python/datastore/entities and I don't see where I'm wrong.