I have a table called Mytable in home/models.py and using django aep I reference is as Mytable.all().
It shows up in the Data Viewer as home_mytable
Now, for some urls within app.yaml I have a separate handler that processes these requests. (This is in fact a google wave robot handler).
Within this handler I want to reference the table home_mytable I do so by calling db.GqlQuery("SELECT * from home_mytable")
However something strange happens. I receive a KindError No implementation for kind home_mytable
I receive this sporadically though, sometimes It works just fine, I suspect that happens right after I call up a url that references this table from a django handler.
My questions are, how can I a) ensure that this error doesnt occur and b) programattically check what the available 'kinds' are so I can try and debug this
App Engine Patch monkeypatches your models to have different kind names. Don't ask me why, but that's what it does. To fix things, you need to override the kind() class method in your models to make sure they always have the 'fixed' kind names, like this:
class MyTable(db.Model):
@classmethod
def kind(cls):
return "home_mytable"