Have every class inherit from object.
This commit is contained in:
parent
a8127b0f41
commit
de0e42240c
14 changed files with 33 additions and 22 deletions
|
|
@ -120,7 +120,7 @@ class Msg(SharedMemoryModel):
|
|||
SharedMemoryModel.__init__(self, *args, **kwargs)
|
||||
self.extra_senders = []
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
"Define Django meta options"
|
||||
verbose_name = "Message"
|
||||
|
||||
|
|
@ -543,7 +543,7 @@ class ChannelDB(TypedObject):
|
|||
__defaultclasspath__ = "evennia.comms.comms.DefaultChannel"
|
||||
__applabel__ = "comms"
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
"Define Django meta options"
|
||||
verbose_name = "Channel"
|
||||
verbose_name_plural = "Channels"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
"""
|
||||
This defines how to edit help entries in Admin.
|
||||
"""
|
||||
from builtins import object
|
||||
|
||||
from django import forms
|
||||
from django.contrib import admin
|
||||
from evennia.help.models import HelpEntry
|
||||
|
|
@ -9,7 +11,7 @@ from evennia.help.models import HelpEntry
|
|||
|
||||
class HelpEntryForm(forms.ModelForm):
|
||||
"Defines how to display the help entry"
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
model = HelpEntry
|
||||
fields = '__all__'
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ forms of help that do not concern commands, like information about the
|
|||
game world, policy info, rules and similar.
|
||||
|
||||
"""
|
||||
from builtins import object
|
||||
|
||||
from django.db import models
|
||||
from evennia.utils.idmapper.models import SharedMemoryModel
|
||||
from evennia.help.manager import HelpEntryManager
|
||||
|
|
@ -77,7 +79,7 @@ class HelpEntry(SharedMemoryModel):
|
|||
return TagHandler(self)
|
||||
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
"Define Django meta options"
|
||||
verbose_name = "Help Entry"
|
||||
verbose_name_plural = "Help Entries"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
# This sets up how models are displayed
|
||||
# in the web admin interface.
|
||||
#
|
||||
from builtins import object
|
||||
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
|
|
@ -32,7 +33,7 @@ class ObjectCreateForm(forms.ModelForm):
|
|||
This form details the look of the fields.
|
||||
|
||||
"""
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
model = ObjectDB
|
||||
fields = '__all__'
|
||||
db_key = forms.CharField(label="Name/Key",
|
||||
|
|
@ -56,7 +57,7 @@ class ObjectEditForm(ObjectCreateForm):
|
|||
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
fields = '__all__'
|
||||
db_lock_storage = forms.CharField(label="Locks",
|
||||
required=False,
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ class ObjectDB(TypedObject):
|
|||
logger.log_warn("db_location direct save triggered contents_cache.init() for all objects!")
|
||||
[o.contents_cache.init() for o in self.__dbclass__.get_all_cached_instances()]
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
"Define Django meta options"
|
||||
verbose_name = "Object"
|
||||
verbose_name_plural = "Objects"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
# This sets up how models are displayed
|
||||
# in the web admin interface.
|
||||
#
|
||||
from builtins import object
|
||||
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
|
|
@ -19,7 +20,7 @@ class PlayerDBChangeForm(UserChangeForm):
|
|||
Modify the playerdb class.
|
||||
|
||||
"""
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
model = PlayerDB
|
||||
fields = '__all__'
|
||||
|
||||
|
|
@ -54,7 +55,7 @@ class PlayerDBCreationForm(UserCreationForm):
|
|||
Create a new PlayerDB instance.
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
model = PlayerDB
|
||||
fields = '__all__'
|
||||
|
||||
|
|
@ -86,7 +87,7 @@ class PlayerForm(forms.ModelForm):
|
|||
Defines how to display Players
|
||||
|
||||
"""
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
model = PlayerDB
|
||||
fields = '__all__'
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ persistently store attributes of its own. This is ideal for extra
|
|||
account info and OOC account configuration variables etc.
|
||||
|
||||
"""
|
||||
from builtins import object
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import models
|
||||
|
|
@ -100,7 +101,7 @@ class PlayerDB(TypedObject, AbstractUser):
|
|||
__defaultclasspath__ = "evennia.players.players.DefaultPlayer"
|
||||
__applabel__ = "players"
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
verbose_name = 'Player'
|
||||
|
||||
# alias to the objs property
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ Common examples of uses of Scripts:
|
|||
- Give the player/object a time-limited bonus/effect
|
||||
|
||||
"""
|
||||
from builtins import object
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import models
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
|
|
@ -105,7 +107,7 @@ class ScriptDB(TypedObject):
|
|||
__defaultclasspath__ = "evennia.scripts.scripts.DefaultScript"
|
||||
__applabel__ = "scripts"
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
"Define Django meta options"
|
||||
verbose_name = "Script"
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ Config values should usually be set through the
|
|||
manager's conf() method.
|
||||
|
||||
"""
|
||||
from builtins import object
|
||||
|
||||
try:
|
||||
import cPickle as pickle
|
||||
except ImportError:
|
||||
|
|
@ -99,7 +101,7 @@ class ServerConfig(WeakSharedMemoryModel):
|
|||
self.delete()
|
||||
value = property(__value_get, __value_set, __value_del)
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
"Define Django meta options"
|
||||
verbose_name = "Server Config value"
|
||||
verbose_name_plural = "Server Config values"
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ class PassAvatarIdTerminalRealm(TerminalRealm):
|
|||
return user
|
||||
|
||||
|
||||
class TerminalSessionTransport_getPeer:
|
||||
class TerminalSessionTransport_getPeer(object):
|
||||
"""
|
||||
Taken from twisted's TerminalSessionTransport which doesn't
|
||||
provide getPeer to the transport. This one does.
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ class Attribute(SharedMemoryModel):
|
|||
def locks(self):
|
||||
return LockHandler(self)
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
"Define Django meta options"
|
||||
verbose_name = "Evennia Attribute"
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class TypeclassBase(SharedMemoryModelBase):
|
|||
|
||||
# typeclass proxy setup
|
||||
if not "Meta" in attrs:
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
proxy = True
|
||||
app_label = attrs.get("__applabel__", "typeclasses")
|
||||
attrs["Meta"] = Meta
|
||||
|
|
@ -285,7 +285,7 @@ class TypedObject(SharedMemoryModel):
|
|||
return NAttributeHandler(self)
|
||||
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
"""
|
||||
Django setup info.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class Tag(models.Model):
|
|||
# this is None, alias or permission
|
||||
db_tagtype = models.CharField('tagtype', max_length=16, null=True, help_text="overall type of Tag", db_index=True)
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
"Define Django meta options"
|
||||
verbose_name = "Tag"
|
||||
unique_together = (('db_key', 'db_category', 'db_tagtype'),)
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ leave caching unexpectedly (no use of WeakRefs).
|
|||
|
||||
Also adds `cache_size()` for monitoring the size of the cache.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import absolute_import, division
|
||||
from builtins import object
|
||||
|
||||
import os, threading, gc, time
|
||||
#from twisted.internet import reactor
|
||||
|
|
@ -209,7 +209,7 @@ class SharedMemoryModel(with_metaclass(SharedMemoryModelBase, Model)):
|
|||
|
||||
objects = SharedMemoryManager()
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
abstract = True
|
||||
|
||||
@classmethod
|
||||
|
|
@ -419,7 +419,7 @@ class WeakSharedMemoryModel(with_metaclass(WeakSharedMemoryModelBase, SharedMemo
|
|||
Uses a WeakValue dictionary for caching instead of a regular one
|
||||
|
||||
"""
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
abstract = True
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue