Make scripts/objects lists use EvMore. Change EvMore to not justify by default.

This commit is contained in:
Griatch 2020-01-11 15:49:12 +01:00
parent b5aee2c41e
commit 69d85bd184
221 changed files with 2190 additions and 6810 deletions

View file

@ -301,13 +301,7 @@ class DefaultChannel(ChannelDB, metaclass=TypeclassBase):
CHANNELHANDLER.update()
def message_transform(
self,
msgobj,
emit=False,
prefix=True,
sender_strings=None,
external=False,
**kwargs,
self, msgobj, emit=False, prefix=True, sender_strings=None, external=False, **kwargs
):
"""
Generates the formatted string sent to listeners on a channel.
@ -361,9 +355,7 @@ class DefaultChannel(ChannelDB, metaclass=TypeclassBase):
# note our addition of the from_channel keyword here. This could be checked
# by a custom account.msg() to treat channel-receives differently.
entity.msg(
msgobj.message,
from_obj=msgobj.senders,
options={"from_channel": self.id},
msgobj.message, from_obj=msgobj.senders, options={"from_channel": self.id}
)
except AttributeError as e:
logger.log_trace("%s\nCannot send msg to '%s'." % (e, entity))
@ -371,8 +363,7 @@ class DefaultChannel(ChannelDB, metaclass=TypeclassBase):
if msgobj.keep_log:
# log to file
logger.log_file(
msgobj.message,
self.attributes.get("log_file") or "channel_%s.log" % self.key,
msgobj.message, self.attributes.get("log_file") or "channel_%s.log" % self.key
)
def msg(
@ -426,9 +417,7 @@ class DefaultChannel(ChannelDB, metaclass=TypeclassBase):
senders = make_iter(senders) if senders else []
if isinstance(msgobj, str):
# given msgobj is a string - convert to msgobject (always TempMsg)
msgobj = TempMsg(
senders=senders, header=header, message=msgobj, channels=[self]
)
msgobj = TempMsg(senders=senders, header=header, message=msgobj, channels=[self])
# we store the logging setting for use in distribute_message()
msgobj.keep_log = keep_log if keep_log is not None else self.db.keep_log
@ -689,8 +678,7 @@ class DefaultChannel(ChannelDB, metaclass=TypeclassBase):
"""
content_type = ContentType.objects.get_for_model(self.__class__)
return reverse(
"admin:%s_%s_change" % (content_type.app_label, content_type.model),
args=(self.id,),
"admin:%s_%s_change" % (content_type.app_label, content_type.model), args=(self.id,)
)
@classmethod