It seems that thing actually loading from the db.ReferenceProperty() field (on the Cheese object), which seems to be related to the Cheese object. If you gain access to such a property without first importing the Cheese model, then the code will not be able to find the Cheese type for creating the object and the error you specified will fail.
In any case, try importing the Cheese model into the code that causes the error. Then the code should be able to find an implementation for Cheese when necessary.
To answer another part of your question: Yes, of course you can add your own methods to a subclass of db.Model .
source share