I'm not going to make any claims to being a python expert, nor is this
a trivial question.
What I want to do is have the ability to have an abstract interface
for table contruction -- think UI where you can say "add field ...
type String". Once you've specified the database table format from
the UI, would like to take advatange of the non-tightly structured
database underlying App Engine.
What I would like to have is a class like:
GenericTable(db.Model)
....
def __init__(self, tbl) :
...
def __getattr__(self, name) :
....for purposes of example...
So in my view code I can say:
tbl = GenericTable("books")
items = tbl.all()
for item in items :
...something interesting...
...with the ability to say item['price'] -- via the above
__getattr__
Hopefully this gives you a good idea of intent, where things are
getting muddled up is I'm not sure if it's better to extend db.Model /
db.PropertiedClass or build something totally new from the ground
up...
Anybody tried this before, or maybe has some good pointers on what is
a "better" course of action?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---