First version with all caches seemingly working ok. Started to remove the on-model wrappers that are not handled by the idmapper metaclass.

This commit is contained in:
Griatch 2013-07-11 15:59:03 +02:00
parent f1ba0ca177
commit 9e10a41e18
10 changed files with 144 additions and 165 deletions

View file

@ -96,6 +96,10 @@ class ScriptDB(TypedObject):
# Database manager
objects = ScriptManager()
# caches for quick lookups
_typeclass_paths = settings.SCRIPT_TYPECLASS_PATHS
_default_typeclass_path = settings.BASE_SCRIPT_TYPECLASS or "src.scripts.scripts.DoNothing"
class Meta:
"Define Django meta options"
verbose_name = "Script"
@ -233,11 +237,6 @@ class ScriptDB(TypedObject):
#
#
# this is required to properly handle attributes and typeclass loading
_typeclass_paths = settings.SCRIPT_TYPECLASS_PATHS
#_attribute_class = ScriptAttribute
_db_model_name = "scriptdb" # used by attributes to safely store objects
_default_typeclass_path = settings.BASE_SCRIPT_TYPECLASS or "src.scripts.scripts.DoNothing"
def at_typeclass_error(self):
"""