mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 20:17:16 +02:00
Strange issue with __init__, proxy implementation not working at the moment.
This commit is contained in:
parent
3adeade69a
commit
08d0442f9c
2 changed files with 3 additions and 19 deletions
|
|
@ -742,23 +742,6 @@ class PermissionHandler(TagHandler):
|
|||
# imported for access by other
|
||||
from src.utils.idmapper.base import SharedMemoryModelBase
|
||||
|
||||
class TypeclassModelBase(SharedMemoryModelBase):
|
||||
"""
|
||||
Metaclass for typeclasses
|
||||
"""
|
||||
def __init__(cls, *args, **kwargs):
|
||||
"""
|
||||
We must define our Typeclasses as proxies. We also store the path
|
||||
directly on the class, this is useful for managers.
|
||||
"""
|
||||
super(TypeclassModelBase, cls).__init__(*args, **kwargs)
|
||||
class Meta:
|
||||
proxy = True
|
||||
cls.Meta = Meta
|
||||
cls.typename = cls.__name__
|
||||
cls.path = "%s.%s" % (cls.__module__, cls.__name__)
|
||||
|
||||
|
||||
class TypeclassBase(SharedMemoryModelBase):
|
||||
"""
|
||||
Metaclass which should be set for the root of model proxies
|
||||
|
|
@ -775,8 +758,8 @@ class TypeclassBase(SharedMemoryModelBase):
|
|||
proxy = True
|
||||
cls.Meta = Meta
|
||||
# convenience for manager methods
|
||||
cls.typename = cls.__name__
|
||||
cls.path = "%s.%s" % (cls.__module__, cls.__name__)
|
||||
#cls.typename = cls.__name__
|
||||
#cls.path = "%s.%s" % (cls.__module__, cls.__name__)
|
||||
|
||||
|
||||
class TypedObject(SharedMemoryModel):
|
||||
|
|
|
|||
|
|
@ -429,6 +429,7 @@ class SharedMemoryModelBase(ModelBase):
|
|||
"""
|
||||
This is for the typeclass system.
|
||||
"""
|
||||
super(SharedMemoryModelBase, cls).__init__(*args, **kwargs)
|
||||
cls.typename = cls.__name__
|
||||
cls.path = "%s.%s" % (cls.__module__, cls.__name__)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue