Lots of re-arranging of the comsys and near completion of comsys player commands. I'm going to halt further progres on this long enough for me to take a second look at my code and re-factor some things, then go on to work on some of the lesser-used commands. New in this revision: on, off, last, who for channels (pub who, etc.). Make sure you nuke all of your comsys-related tables and re-sync.

This commit is contained in:
Greg Taylor 2007-05-25 03:24:23 +00:00
parent 49b6a0ba57
commit c7f32f904d
6 changed files with 249 additions and 77 deletions

View file

@ -745,7 +745,7 @@ class CommChannel(models.Model):
Returns the channel's header text, or what is shown before each channel
message.
"""
return ansi.parse_ansi(self.header)
return ansi.parse_ansi(self.ansi_name)
def get_owner(self):
"""
@ -780,9 +780,8 @@ class CommChannelMessage(models.Model):
A single logged channel message.
"""
channel = models.ForeignKey(CommChannel, related_name="msg_channel")
sender = models.ForeignKey(Object, related_name="msg_sender", blank=True, null=True)
message = models.CharField(maxlength=255)
date_sent = models.DateField(editable=False, auto_now_add=True)
date_sent = models.DateTimeField(editable=False, auto_now_add=True)
def __str__(self):
return "%s: %s" % (self.sender.name, self.message)
@ -791,7 +790,7 @@ class CommChannelMessage(models.Model):
ordering = ['-date_sent']
class Admin:
list_display = ('channel', 'sender', 'message')
list_display = ('channel', 'message')
import functions_db
import functions_general