Made changes to idmapper that might help alleviate issue101 (more people need to run it to make sure). Moved around default command modules to be more logically named and distributed.

This commit is contained in:
Griatch 2010-10-31 08:10:02 +00:00
parent 19dd476115
commit 3f703efc2d
17 changed files with 1920 additions and 1851 deletions

View file

@ -4,6 +4,8 @@ abstract models in dbobjects.py (and which are thus shared by
all Attributes and TypedObjects).
"""
from django.db import models
from src.utils import idmapper
#from src.typeclasses import idmap
# Managers
@ -76,7 +78,10 @@ def returns_typeclass(method):
return None
return func
class TypedObjectManager(models.Manager):
#class TypedObjectManager(idmap.CachingManager):
#class TypedObjectManager(models.Manager):
class TypedObjectManager(idmapper.manager.SharedMemoryManager):
"""
Common ObjectManager for all dbobjects.
"""

View file

@ -958,8 +958,3 @@ class TypedObject(SharedMemoryModel):
"Stop accidental deletion."
raise Exception("Cannot delete the ndb object!")
ndb = property(ndb_get, ndb_set, ndb_del)