OBS- need to run migrations! Refactored attributes to use a slightly different internal storage format for faster access. Also set up caching of all attribute data, so subsequent reads of an attribute will not hit the database anymore, and writes will re-cache.

This commit is contained in:
Griatch 2012-02-14 23:40:16 +01:00
parent 8b5f3628ab
commit a32aebaa0e
12 changed files with 560 additions and 152 deletions

View file

@ -25,7 +25,8 @@ DA = object.__delattr__
# full access anyway), so no protection against changing
# e.g. 'locks' or 'permissions' should go here.
PROTECTED = ('id', 'dbobj', 'db', 'ndb', 'objects', 'typeclass',
'attr', 'save', 'delete')
'attr', 'save', 'delete', 'db_model_name','attribute_class',
'typeclass_paths')
# If this is true, all non-protected property assignments
# are directly stored to a database attribute
@ -207,3 +208,5 @@ class TypeClass(object):
def __str__(self):
"represent the object"
return self.key
def __unicode__(self):
return u"%s" % self.key