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

@ -6,7 +6,7 @@
from django import forms
from django.conf import settings
from django.contrib import admin
from src.typeclases.models import Attribute
from src.typeclasses.models import Attribute
from src.objects.models import ObjectDB, ObjectNick, Alias
from src.utils.utils import mod_import

View file

@ -187,8 +187,11 @@ class ObjectDB(TypedObject):
# Database manager
objects = ObjectManager()
# Add the object-specific handlers
# caches for quick lookups of typeclass loading.
_typeclass_paths = settings.OBJECT_TYPECLASS_PATHS
_default_typeclass_path = settings.BASE_OBJECT_TYPECLASS or "src.objects.objects.Object"
# Add the object-specific handlers
def __init__(self, *args, **kwargs):
"Parent must be initialized first."
TypedObject.__init__(self, *args, **kwargs)
@ -495,11 +498,6 @@ class ObjectDB(TypedObject):
# ObjectDB class access methods/properties
#
# this is required to properly handle attributes and typeclass loading.
_typeclass_paths = settings.OBJECT_TYPECLASS_PATHS
#_attribute_class = ObjAttribute
_db_model_name = "objectdb" # used by attributes to safely store objects
_default_typeclass_path = settings.BASE_OBJECT_TYPECLASS or "src.objects.objects.Object"
#@property
def __sessions_get(self):