mirror of
https://github.com/evennia/evennia.git
synced 2026-04-17 21:59:06 +02:00
Implemented NickHandler, AliasHandler and TagHandler in the typeclass to replace the old handlers. Some errors during login.
This commit is contained in:
parent
2c17b7b675
commit
0061f884ae
7 changed files with 176 additions and 222 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue