Implemented NickHandler, AliasHandler and TagHandler in the typeclass to replace the old handlers. Some errors during login.

This commit is contained in:
Griatch 2013-07-12 14:44:49 +02:00
parent 2c17b7b675
commit 0061f884ae
7 changed files with 176 additions and 222 deletions

View file

@ -28,7 +28,7 @@ from django.conf import settings
from django.db import models
from django.db.models.signals import post_init, pre_delete
from src.typeclasses.models import Attribute, TypedObject
from src.typeclasses.models import Attribute, TypedObject, TagHandler, AliasHandler, NickHandler
from django.contrib.contenttypes.models import ContentType
from src.scripts.manager import ScriptManager
@ -104,6 +104,12 @@ class ScriptDB(TypedObject):
"Define Django meta options"
verbose_name = "Script"
def __init__(self, *args, **kwargs):
super(ScriptDB, self).__init__(self, *args, **kwargs)
_SA(self, "tags", TagHandler(self, "script"))
_SA(self, "aliases", AliasHandler(self, "script"))
# Wrapper properties to easily set database fields. These are
# @property decorators that allows to access these fields using
# normal python operations (without having to remember to save()