Answer the question
In order to leave comments, you need to log in
Create model in GAE(python) on the fly?
Is it possible to create a “model” (in a sense, “tables”) in an application at run time.
In other words, it is necessary: to create “tables” and assign properties and their types to them from the application form. After creation, get a list of “tables” data and interact with them in the same way as “ordinary” ones:
class Pet(db.Model):
name = db.StringProperty(required=True)
type = db.StringProperty(required=True, choices=set(["cat", "dog", "bird"]))
birthdate = db.DateProperty()
weight_in_pounds = db.IntegerProperty()
spayed_or_neutered = db.BooleanProperty()
owner = db.UserProperty(required=True)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question